John McPhee calmly moved into pole position for the Valencia Moto3 Grand Prix but crashed late on, as Danny Kent's failed to set a fast lap and Oliveira took advantage and fourth.

John McPhee snatched his first true pole in the Saturday Moto3 Valencia Grand Prix qualifying session with his early pace leaving him secure at the top as he crashed in the final stages.

After setting the pace on just his fourth circuit of the track the SaxoPrint-RTG rider saw his time of 1m 39.364 hold strong for pole position rewarding the team who have opted to keep faith with John McPhee next year, leading to the Honda man having a new calmness with his future settled.

A late crash saw the Briton leaning on the barriers but with no-one posting a faster lap he held on to pole, having started there previously when he moved to the top slot on the grid in Australia following Kent's penalty.

The second slot is filled by Sky Racing VR46 team rider Romano Fenati, still in the hunt for third in the championship, but also seen pushing his bike back to the pits after the flag.

The front row is completed by Efren Vazquez, the Leopard man keen to leave Moto3 with a win.

Behind them the title battle hangs in the balance as Danny Kent could only manage 18th while teamwork and perseverance elevated Miguel Oliveira to fourth.

Oliveira circulated heavily with his Red Bull KTM team-mate Brad Binder to help with pace and pushed on on his final lap as the clock hit zero to move up to fourth and give the Portuguese rider a good chance to win the race, which he must do to prevent Kent taking the title.

Kent had said that he wanted to put in long strings of laps to work on race pace but neglected to bank a strong lap to place him near the front of the grid.

That left him chasing down a group of middle order riders in a last effort to improve with no success, leaving him 18th and needing a 14th place finish if Oliveira takes victory.

Also looking for success at the Ricardo Tormo track is rookie of the year and Valencian, Jorge Navarro. The Estrella Galicia rider had his pole-worthy lap scrapped for exceeding the track limits as he followed Isaac Vinales' poor line ahead, pushing him down to ninth before he rallied for fifth.

One time title challenger Enea Bastianini also improved in the closing minutes pushing his Gresini up to sixth.

Niccolo Antonelli took pole in 2014 but a series of bike issues and crashes over the weekend continued to hamper his progress in qualifying, with the Italian knuckling down to secure seventh for Ongetta-Rivacold before tumbling off-track again.

Karel Hanika also improved when he returned to track after he took his broken bike back to the pits with the number smashed off. He returned for eighth to kick off a KTM heavy middle of the grid for Kent to contend with.

His Red Bull team-mate Binder is just behind in ninth while a rare ally for Kent may come from his fellow Leopard rider Hiroki Ono, who completes the top ten.

A returning Fabio Quartararo secured eleventh on his Estrella Galicia Honda, with KTM's filling the next five grid spots, including Wild-card Nicolo Bulega who impressed in FP3 in his first grand prix appearance when he finished fifth, the Sky Racing Team VR46 2016 signing continued to show why he makes a full-time Moto3 move with a 16th place start.

Fabio Di Giannantonio also makes his world championship debut, in at Gresini for the injured Andrea Locatelli and the Italian starts 27th.

Tatsuki Suzuki was the first to fall, flying off track after just four minutes of the session gone.