Published 20/04/2018 at 20:47 GMT | Updated 20/04/2018 at 21:00 GMT
Having spent much of the session playing second fiddle to Honda's Marc Marquez, Iannone pulled out an amazing lap of 2m04.599s on the last lap of the session to beat Marquez - winner of all five MotoGP races at Austin so far - by 0.056 seconds.
Marquez had led the session from the start, working down to 2m05.287s on his opening run. On his second run, Marquez - using a hard rear tyre - whirled around in 2m04.963s, putting him 0.85s ahead with 20 minutes to go.
He then fell on the very next lap, losing the front end as he turned into the Turn 11 left-hander leading onto the back straight, but was able to climb back aboard and coast back to the pits.
Suzuki Ecstar Italian rider Andrea Iannone powers his bike during the qualifying session of the Malaysia MotoGP at the Sepang International circuit in Sepang
Image credit: Getty Images
Marquez re-emerged in the closing moments to lower his time fractionally to 2m04.951s, then worked down to 2m04.655s before Iannone pulled out his last-gasp stormer.
Maverick Vinales was third fastest, 0.264s off the pace, ahead of Yamaha team-mate Valentino Rossi.
Points leader Cal Crutchlow completed the top five on his LCR Honda, ahead of Suzuki's Alex Rins, and the Ducatis of Jorge Lorenzo and Andrea Dovizioso.
Weather conditions remained cool at the start of the session, but the sun finally broke through the clouds and appeared to switch on the tyres in the closing moments of the session.
Moto GP: Marc Marquez guidonnage
Image credit: Eurosport
With rain forecast for Saturday, this session is likely to have been crucial for riders' chances of making Q2.
The injured Dani Pedrosa was 10th fastest, but appeared to be in pain from his recently-broken wrist during the session.
KTM's Pol Espargaro fell after losing the front at the tight Turn 15 left-hander without injury or much damage, while LCR Honda's Takaaki Nakagami crashed in the closing moments at the Turn 5 downhill sweeper.