Alcaiz - Valentino Rossi stole the Aragon MotoGP qualifying headlines on Saturday by securing a front row seat on the grid a mere three weeks after double leg fracture surgery.
The wounded nine-time champion, wearing a surgical stocking, defied medical experts and gritted his teeth through the pain to post the third fastest time for Sunday's race behind his Yamaha teammate Maverick Vinales and Ducati's Jorge Lorenzo.
World champion Marc Marquez appeared set for pole only to crash on his Honda two minutes from the end of the session, having already taken a tumble in final practice.
The Spaniard starts on the second row in the company of Cal Crutchlow and Dani Pedrosa.
Seconds after Marquez's premature exit Rossi was topping the timesheets, only to be bettered as the session drew to a dramatic close by first Vinales with a 1min 47.635 lap and then Lorenzo at .100s.
Rossi, placed fourth in the world championship standings, broke his leg in two places in a training accident on August 31.
Operated on the following day his medical team had initially forecast a return for the next race in Japan.
But that was without counting on the 38-year-old veteran's remarkable resilience as he targets a tenth world title and eighth in the top category.
"It's a big surprise for me, one week ago I started to think I could race but I didn't know what to expect," a beaming Rossi, who had come in 20th in practice on Friday and improving to 10th on Saturday morning, told BT Sport.
"I was in quite a lot of pain in Misano (the Italian circuit where he tested his fitness on Tuesday), but luckily the leg has got better day by day, I can ride with a bit of pain."
"It's very important to start from the front row," added the motorcycling legend known as 'the doctor'.
Marquez will be cursing his late spill when his Honda slipped from under him in a downhill stretch with the bike on the edge of the track.
He won last weekend in San Marino to draw level with Andrea Dovizioso, who starts Sunday's race on the third row, on 199 points at the head of the standings, with Vinales in third on 183 and Rossi on 157.
After Sunday's race in Aragon the MotoGP season moves on to Japan before the closing three legs of the 2017 season in Australia, Malaysia and back in Spain for the finale in Valencia.
Leading grid positions for Sunday's Aragon motorcycling Grand Prix after qualifying on Saturday:
1. Maverick Vinales (ESP/Yamaha) 1:47.635, 2. Jorge Lorenzo (ESP/Ducati) at 0.100 sec, 3. Valentino Rossi (ITA/Yamaha) 0.180
4. Cal Crutchlow (GBR/Honda) 0.195, 5. Marc Marquez (ESP/Honda) 0.328, 6. Dani Pedrosa (ESP/Honda) 0.472
7. Andrea Dovizioso (ITA/Ducati) 0.502, 8. Aleix Espargaro (ESP/Aprilia) 0.524, 9. Alvaro Bautista (ESP/Ducati) 0.552
10. Andrea Inannone (ITA/Suzuki) 0.654, 11. Johann Zarco (FRA/Yamaha) 0.767, 12. Mika Kallio (FIN/KTM) 0.836
1. Miguel Oliveira (POR/KTM) 1:53.736, 2. Mattia Pasini (ITA/Kalex) 0.021, 3. Alex Marquez (ESP/Kalex) 0.071
4. Franco Morbidelli (ITA/Kalex) 0.105, 5. Simone Corsi (ITA/Speed Up) 0.140, 6. Jorge Navarro (ESP/Kalex) 0.186
7. Thomas Luthi (SUI/Kalex) 0.240, 8. Marcel Schrotter (GER/Suter) 0.317, 9. Sandro Cortese (GER/Suter) 0.336
10. Takaaki Nakagami (JPN/Kalex) 0.413, 11. Dominique Aegerter (SUI/Suter) 0.489, 12. Francesco Bagnaia (ITA/Kalex) 0.546
1. Jorge Martin (ESP/Honda) 1:58.067, 2. Enea Bastianini (ITA/Honda) at 0.358s, 3. Aron Canet (ESP/Honda) 0.449
4. Nicolo Bulega (ITA/KTM) 0.526, 5. Dennis Foggia (ITA/KTM) 0.701, 6. Joan Mir (ESP/Honda) 0.717
7. John McPhee (GBR/Honda) 0.746, 8. Philipp Oettl (GER/KTM) 0.894, 9. Tatsuki Suzuki (JPN/Honda) 0.909
10. Marcos Ramirez (ESP/KTM) 0.918, 11. Romano Fenati (ITA/Honda) 1.098, 12. Gabriel Rodrigo (ARG/KTM) 1.100