Danny Webb took his and Mahindra's first ever 125cc pole position in the series' last ever qualifying session at a damp Valencia.
Drying conditions prompted a spectacular pole battle, with Webb, Louis Rossi and Alexis Masbou choosing to go for slick tyres in the closing moments and reaping the benefits.
Championship leader Nico Terol will start only ninth, six places behind title rival Johann Zarco - although Terol needs just an 11th position to seal the crown, regardless of what Zarco does.
Webb made by far the best use of the slicks to set a string of searing provisional pole times, eventually ending on a 1m45.988s - nearly two seconds clear of the field for a while, although second-placed Rossi's Matteoni Aprilia was within half a second in the end.
Fellow slick runner Masbou was fifth on the Caretta KTM, with Zarco (Ajo Derbi) the quickest wet tyre user in third, ahead of Luis Salom's RW Aprilia.
Terol could only manage ninth for Aspar - although the eventual result was far better for the Spaniard than it had looked at one stage during the ever-changing session, when Zarco held provisional pole and Terol was only 22nd.
Hector Faubel (Aspar Aprilia), Sandro Cortese (Team Germany Aprilia) and Maverick Vinales (Blusens Aprilia) will start just ahead of Terol in sixth to eighth places, with Ajo's Jonas Folger completing the top 10.
Masbou's team-mate Jack Miller was spectacularly quick in the wet and held provisional pole for a while, before slipping to 12th as conditions improved.