Red Bull driver Sergio Perez had viewed the build up to the Miami Grand Prix as his worst weekend of the season so far - right up to the moment when he managed to grasp pole position for Sunday's race.
Perez admitted that the outcome of today's qualifying session hads come as a complete surprise to him, as he had very limited expectations for success going in.
"I think it's been my worst weekend up to qualifying, really," he told Danica Patrick in parc ferme after the end of qualifying. "It was one of those weekends where I was just struggling for balance and confidence."
Perez had been anointed F1's new king of street circuits after his dominant victory over team mate Max Verstappen in Baku last weekend which had reenergised his championship campaign after a stumble in Melbourne.
But instead, he has struggled to get to grips with the slippery new resurfaced track at Miami International Autodrome. He finished P11 in first practice and still trailed Verstappen by half a second at the end of FP2.
"I just couldn't figure out how to pull those tenths that I was missing all the time to Max and to the Ferraris," Perez admitted. "I was just resetting everything. Just everything. It wasn't coming together.
He was third in final practice but no closer to Verstappen in terms of time on Saturday morning, and was initially unable to catch the Dutch driver in the first two rounds of qualifying.
"We did a small change into qualifying and everything became more alive," Perez said. "I think with this tarmac we were just playing a bit with the tools, and we put the lap in when it mattered."
Everything changed when a mistake by Verstappen on his first push lap in Q3 allowed Perez to take provisional pole with a lap of 1:26.841s. Verstappen didn't get a second chance, as the session then ended early under a red flag.
It means that Perez will start the race from pole position for the second time this year, with Aston Martin's Fernando Alonso lining up alongside him on the front row of the grid.
Perez was just one point behind Verstappen in the championship standings after the Saudi Arabian GP, but dropped 14 points away after struggling in Melbourne. Success in Baku brought him back to within six points of his team mate.
Now, with Verstappen starting tomorrow's race from P9 and Perez on pole, there is a realistic chance for the Mexican driver to take the lead of the title battle for the first time on Sunday.
"Tomorrow it's a new opportunity starting from pole," he agreed. "Yeah, see what happens tomorrow.
"I'm just thinking race-by-race I will go out and cheer for my team, because they've done a tremendous job," he added.
Keep up to date with all the F1 news via Facebook and Twitter