Britain's Tao Geoghegan Hart won Saturday's 20th and penultimate stage of the Giro d'Italia, edging new overall leader Jai Hindley, with the pair on the same time heading into Sunday's closing time-trial.
Hindley and Geoghegan Hart will go head-to-head for the title in a 15.7km time-trial which finishes in front of Milan's iconic gothic Duomo Cathedral.
Although Hindley took the pink jersey from his Sunweb teammate Wilco Kelderman, all-rounder Geoghegan Hart, who gained precious bonus seconds by winning, will go into the final stage as the favorite.
Hindley is the official overall leader courtesy of being 86 hundredths of a second ahead.
It is an unexpected finale as neither rider had been their team leader when the race got underway in Sicily three weeks ago.
"I'm very happy for myself, for my team and for the Giro," said Geoghegan Hart whose Ineos team leader Geraint Thomas withdrew with a broken pelvis after stage three.
"Today was a beautiful day! Tomorrow's time-trial will be a matter of legs, the route is short. I hope to have a good day and a bit of luck, then we will see."
Previous pink jersey wearer Kelderman had faltered on the second of three climbs in Sestriere, 30km from the finish of the 190km stage, allowing his teammate Hindley to move ahead.
"Incredible, I'm speechless," said Hindley.
"From an early age I dreamed of wearing the maglia rosa, it's a huge honor for me, I still don't believe it."
In a carbon copy of the Stelvio stage on Thursday, Australian Rohan Dennis blew open the group and only his team leader Geoghegan Hart and Hindley stayed with him.
Kelderman, already struggling on the Stelvio, where he took the overall lead from Portugal's Joao Almeida, limited the loss of time to around 40 seconds at the top.
But the gap widened by another minute at the foot of the third and final Alpine ascent, a 6.9km climb with a 7.2-percent gradient.
Hindley went on the attack several times in the last 2.3km, without managing to shake off Geoghegan Hart.
At the top, the 25-year-old won the sprint for his second stage success, six days after his first.
Hindley, 24, wears the pink jersey for the first time in his career, with Kelderman falling to third place at 1min 32sec.
"It's a bike race. Anything can happen (tomorrow)," said Geoghegan Hart.
"Especially after 20 days of racing in tough conditions. We'll see how it goes -- I'll do my best and I can't change anything beyond that."
Geoghegan Hart already got the better of Hindley in the 17.7km time-trial at Valdobbiadene. But Hindley was faster in the opening time-trial in Palermo.
"That was a long time ago, a lot has happened since," warned Geoghegan Hart after giving Ineos their sixth stage win.
Ineos manager Dave Brailsford was optimistic of the Londoner's chances of winning the Giro two years after compatriot Chris Froome.
"I think, yes, but then everyone is tired at the end of a Grand Tour," said Brailsford.