Godolphin's royal blue silks were carried to victory in the Investec Derby for the first time as Masar caused a 16-1 upset at Epsom.
Beaten into third in the 2000 Guineas by Saxon Warrior, Charlie Appleby's colt well and truly turned the tables on Aidan O'Brien's favourite who saw his Triple Crown dreams go up in smoke.
Mark Johnston's Dee Ex Bee stuck on for a game second a length and a half behind William Buick on the winner, with Dante Stakes winner Roaring Lion in third.
Saxon Warrior could only finish fourth after meeting trouble in running.
Appleby said: "It's not sunk in yet. It still feels a dream.
"I'm delighted for His Highness Sheikh Mohammed. Firstly for giving me the position to be here. I've always said when I started this job I wanted to be the first person to have a Derby winner in Godolphin blue.
"It's a fantastic team effort, Brett Doyle rides him every day and has been sweet on him since the Guineas. He said he would stay and William has given him a peach of a ride."
He added: "The last 100 yards felt a long way! It's just great. To have a Derby winner for Godolphin is fantastic."
Buick said: "This is huge, it's massive.
"I've come close a couple of times, I think I've had seven or eight rides and while I know people have had more without winning I was wondering if my time was ever going to come.
"He stayed the trip, he travelled beautifully. The Guineas didn't happen for him, but he's a very good horse and the team believed in him.
"Since I wanted to be a jockey this was the day I was dreaming of."
Godolphin founder Sheikh Mohammed said: "It's not easy to win the Derby, but we have won it. We are pleased to be here today.
"Charlie Appleby is a very good trainer and the horse came from Dubai."
He added: "I was jumping up and down in the final furlong.
"Horses are in my blood, I love them."
Dee Ex Bee runs in the colours of Sheikh Mohammed's son, Sheikh Hamdan bin Mohammed Al Maktoum.
His trainer Mark Johnston said: "We came here with doubts about his effectiveness on the track and I'm not sure it suits.
"Because of the camber he rolled on to the one on his inside, but he rallied again up the hill so it bodes really well for the future.
"You could go to the Irish Derby, but I've said before that I don't think I've ever had a horse more suited to the St Leger, so I think it could be best to work backwards from that.
"He's still a big baby and probably the biggest horse in the field, everything suggests there should be better to come."