The main group of GC favourites including Vincenzo Nibali (Bahrain-Merida), Ilnur Zakarin (Katusha) and Domenico Pozzovivo (Ag2r La Mondiale) managed to gap former race leader Tom Dumoulin (Sunweb) on the line by 15 seconds after getting a gap on him on the final climb.
Dumoulin was able to recover with the help of Bob Jungels (Quick-Step) in the chasing group, and minimise his losses on the flatter 14km run in from the top of the Foza climb to the finish.
Frenchman Pinot secured his first Giro stage win after out-sprinting the four other riders of his breakaway group, taking a 10 second time bonus which moves him up to third overall, and Nibali up to second after finishing behind Pinot and Zakarin on the stage.
Dumoulin drops to fourth at 53 seconds behind Quintana and 24 seconds behind Nibali. Pinot sits in fourth at 43 seconds to Quintana.
That leaves the Giro d'Italia title finely poised for the final stage on Sunday; a 29.3km time trial which should suit Dumoulin's strengths.
How it happened
Dylan Teuns (BMC), Tom Jelte Slagter (Cannondale-Drapac), Matthieu Ladagnous (FDJ), Dries Devenyns (Quick-Step), Maxim Belkov (Katusha-Alpecin) and Filippo Pozzato (Wilier Triestina) formed the day's main breakaway.
They established a maximum gap of just over seven minutes ahead of the 24km climb of Monte Grappa, where their gap dropped dramatically to the maglia rosa group as they hit the opening ramps.
Pozzato was the first to be dropped on Monte Grappa, with the breakaway splitting up further with three minutes towards top of the climb.
Devenyns went solo over top ahead of Teuns with 2-50 over the peloton, and the pair eventually joined up and worked together, reaching the Fazo climb with 28.9km to go with 2-47.
Behind, Zakarin and his Katusha teammates had attacked with 76km to go on the Monte Grappa, but the main favourites were able to follow despite a few getting dropped before working their way back.
With stalemate on the biggest climb, the GC group then rode together towards the final climb of Fazo.
Here the breakaway immediately fell apart, with Devenyns dropped early on. Teuns worked hard solo to try and maintain a gap.
But this was the opportunity to take the time needed to rule Dumoulin out of contention in the final time trial, and Nibali attacked first 23.3km to go and 9km remaining on the climb.
He was quickly caught be Movistar and Quintana, but Dumoulin was initially dropped and that was a sign of things to come after he worked his way back.
Zakarin and Pozzovivo were next to attack with 21.8km to go, immediately putting a decent gap to to those behind. Nibali and Quintana then worked together to get away at 21.3km to go and quickly put 15 seconds into Dumoulin.
Teuns was then caught with 20.5km remaining to end any hope of a breakaway victory, while Thibaut Pinot caught Nibali and Quintana with 19.2km to go. The Dumoulin group remained just behind with Jungels working hard with Dumoulin to steady the ship.
And that's how it remained to the top despite Dumoulin yo-yoing back and fourth to Pinot, Nibali and Quintana.
The front two of Pozzovivo and Zakarin had 15 seconds on the Quintana group and 32 on Dumoulin when they crested the climb. But the pair out front were caught by Nibali, Quintana and Pinot with 10.3km to go, with 30 seconds on Dumoulin, on the flatter run-in from the top of the climb to the finish.
The front five struggled to work well together, and the gap between them and the Dumoulin group fell down to 17 seconds with 8.8km remaining.
In then came down to seven seconds and it looked like Dumoulin, who had help from the likes of Adam Yates (Orica-Scott), Bauke Mollema (Trek-Segafredo) as well as Jungels, would get back on.
But the closing 2.8km saw the gap jump back to 19 seconds with Dumoulin beginning to tire.
Quintana, keen on keeping the maximum amount of time between the groups, was happy to lead out the front group in the final kilometre with no eyes on taking the stage.
As they entered the final straight, Pozzovivo was the first to go with 400m remaining, but the best sprinter in the group Pinot latched onto his wheel before coming round him. He was then able to hold his sprint to take the victory and the maximum time on offer over the line.
Zakarin sprinted in for second, with Nibali just behind.
15 seconds later the Dumoulin group rolled in with Dutchman visibly clinging to the back of the group with his last bit of energy, ensuring he has a chance at taking the overall win on Sunday's final time trial.
Giro d'Italia 2017, stage 20: Pordenone - Asiago (190km)
1 Thibaut Pinot (Fra) FDJ, in 4-57-58
2 Ilnur Zakarin (Rus) Katusha-Alpecin
3 Vincenzo Nibali (Ita) Bahrain-Merida
4 Domenico Pozzovivo (Ita) Ag2r La Mondiale
5 Nairo Quintana (Col) Movistar Team, all same time
6 Bob Jungels (Lux) Quick-Step Floors, at 15s
7 Adam Yates (GBr) Orica-Scott
8 Sébastien Reichenbach (Swi) FDJ
9 Bauke Mollema (Ned) Trek-Segafredo
10 Tom Dumoulin (Ned) Team Sunweb, all same time
General classification after stage 20
1 Nairo Quintana (Col) Movistar Team, in 90-00-38
2 Vincenzo Nibali (Ita) Bahrain-Merida, at 39s
3 Thibaut Pinot (Fra) FDJ, at 43s
4 Tom Dumoulin (Ned) Team Sunweb, at 53s
5 Ilnur Zakarin (Rus) Katusha-Alpecin, at 1-15
6 Domenico Pozzovivo (Ita) AG2R La Mondiale, at 1-30
7 Bauke Mollema (Ned) Trek-Segafredo, at 3-03
8 Adam Yates (GBr) Orica-Scott, at 6-50
9 Bob Jungels (Lux) Quick-Step Floors, at 7-18
10 Davide Formolo (Ita) Cannondale-Drapac, at 12-55
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1