Ranier has burst through between runners to deny stablemate Phaistos right on the line and make a winning return at Randwick.
Godolphin trainer James Cummings admitted the team had to be patient and wait until just before scratching time on Saturday morning before deciding whether multiple stakes winner Ranier would take his place in the JCDecaux Handicap (1400m).
Phaistos was first emergency for the benchmark-100 race and the team were keen for him to resume in the race while there were also other possible options for Ranier to begin his campaign.
But when another horse was scratched just before the 7.30am deadline, it paved the way for both Ranier and Phaistos to be in the field and they fought out a thrilling finish.
Phaistos was sent out the $4.60 equal favourite and hit the front under Kerrin McEvoy at the 100m before Hugh Bowman was able to steer multiple stakes winner Ranier ($26) through a tight gap in the closing stages to win by a short half-head.
Dealmaker was a long head away third.
"It was actually a classic case of racing secretarial work to have the nerve to wait right until 7.28am before we had to make a decision to possibly pull out Ranier," Cummings said.
"But Phaistos was able to gain a start and we've ended up with two horses in the race that are both going so well we couldn't split them.
"They've both been going really well and both were first-up. Hugh was determined to ride Ranier quietly so that he could flash home and we really wanted him to ride him that way.
"Phaistos had a good run and was all over a winner but for the bob of a head.
"So both are in for good preparations."
Bowman, who earlier won the Group One Champagne Stakes on King's Legacy, has ridden Ranier several times during his career and was full of praise for the way he powered home.
"His will to win certainly showed in the final stages when we had to change course to get clear running from behind the stablemate," Bowman said.
"I was actually surprised to see my number in the frame, to be perfectly honest."