Liam Lawson took pole for the FIA Formula 2 feature race in Monaco, snatching a last-second lead in Group A despite a yellow flag.
Championship leader Felipe Drugovich was leading for MP Motorsport until the final seconds, when he hit the wall at Turn 19, bringing out the yellow flags in the last sector.
Despite this, the Carlin driver improved on his time to go top with a 1m21.229s to take pole.
2021 feature race winner Theo Pourchaire topped Group B to line up second, with a 1m21.535s securing his place on the front row.
Ayumu Iwasa is set to line up third, having finished second in the first group of runners, but also improved under yellow flag conditions, with Juri Vips in fourth for Hitech.
Jake Hughes will take reverse-grid pole for the sprint race having finished fifth in Group B despite a huge crash, which ended the session, with Marcus Armstrong lining up second.
Heading out on the supersoft tyre, the odd-numbered runners were first to set their qualifying laps on the twisting streets on Monte Carlo.
Barcelona double winner Drugovich was first to set an attacking lap for MP Motorsport, putting in a 1m21.795s to top the timesheet, with Carlin’s Liam Lawson slotting into second.
Ralph Boschung took second with a 1m21.859s, with Marcus Armstrong taking third ahead of Lawson, who was demoted to fourth.
Drugovich improved to a 1m21.348s, with Lawson closing in on him after setting the quickest middle sector.
As the times tumble, Boschung made contact with the wall and suffered damage, making him unable to improve and leaving him to finish in seventh.
Drama came in the final seconds as Drugovich hit the wall at Turn 19, bringing out the yellow flags in the last sector.
Despite this, Lawson managed to improve to go top with a 1m21.229s, but his and the times of other drivers, including Ayumu Iwasa who went second, who improved under the yellow flags which will be looked at by the stewards.
As the times stand, Lawson took the top spot, with Drugovich relegated to third and Virtuosi’s Jack Doohan in fourth.
Williams and Amaury Cordeel both face post-session investigations for pitlane infringements.
MP Motorsport’s Clement Novalak was first to set a flying lap in the second group, comprising of the even-numbered runners, with a 1m23.884s.
Logan Sargeant was next to top the timesheets, heading closer to Group A’s times with a 1m22.230s, with Juri Vips slotting into second.
As the times tumbled, Roy Nissany took the top spot for DAMS with a 1m22.178s, before Jehan Daruvala bettered him despite a brush with the wall, escaping without sustaining damage.
Enzo Fittipaldi was next to set the quickest time with a 1m21.719s, before Vips went over 0.1s quicker to lead with just a few minutes remaining.
Pourchaire snatched the lead before a huge crash from Hughes into the Swimming Pool chicane caused a red flag, ended the session prematurely.