The Frenchman completed the race in 3:42:05, beating red jersey-wearer Simon Yates of Mitchelton-Scott by five seconds. LottoNL-Jumbo’s Steven Kruijswijk completed the podium.
Yates, however, cemented his hold on the red jersey as he extended his race lead from 25 seconds before the stage to 1:38 over Movistar’s Alejandro Valverde.
No solid breakaway occurred in the first 30km of the race, with just 15 seconds separating the leading riders and the peloton.
However, about 47km in Michal Kwiatkowski, Simon Clarke and Amanuel Ghebreigzabhier managed to break free.
Clarke was unable to hold on and dropped back almost 10km later, leaving Kwiatkowski and Ghebreigzabhier to set the pace.
The gap was eventually brought down to just 10 seconds, before 10 other riders bridged across. But, with less than 90km remaining the peloton managed to re-absorb the group.
However, another three riders then went off the front – Tom Van Asbroeck, Jonathan Castroviejo and Benjamin Thomas. They extended their lead to a minute with 76km left.
Van Asbroeck, however, dropped back to the peloton with 64km left.
The peloton began to relax a bit and the leading pair managed to create a two-minute lead over them.
Movistar were controlling proceedings in the peloton and they brought the gap down slightly to 1:40 with 56km left. The gap fluctuated, going back up to two minutes with 49km left.
The gap continued to yo-yo as the breakaway held a 2:18 lead over the Movistar-led peloton with 34km left.
The riders then approached the base of the final climb in Andorra, stretching 17km to the finish with an average gradient of 6.6 per cent.
The start of the climb has the most incline with a maximum gradient of 13.75 per cent.
The peloton upped their pace and, after various attacks, closed the gap to just 38 seconds right before the base of the climb.
The breakaway was caught as the climb started and the peloton began quickly to disperse as the steep gradient took its toll.
Winner Anacona set the pace at the front, with George Bennett on his wheel before Nairo Quintana joined them at the head of affairs.
Steven Kruijswijk and Thibaut Pinot then went ahead and created a gap. Red jersey-holder Yates was in the chasing group and later, with about 10km to go, managed to bridge the gap to the two leaders.
It wasn’t long before Yates was setting the pace in the front group. There were nine riders giving chase in the second group.
With 5km left, Wilco Kelderman attacked from within the chase, but was unable to catch up with the leading group. Kelderman was 34 seconds down on the leading trio and 30 seconds ahead of the chasing group with 4km remaining.
Before the stage, Yates led Valverde by 25 seconds, but at this point the Briton held a 1:30 lead on the virtual GC standings.
Kruijswijk peeled off the back of the leading trio as Yates and Pinot battled it out in the final kilometre.
Yates was content to hand Pinot the victory in the last couple of hundred metres, with the Mitchelton-Scott rider having achieved his objective of consolidating his race lead.
Movistar had set a relentless pace for large parts of the stage, but it blew up in their faces as Valverde fell well short on the GC standings.
“It is the icing on the cake. I didn’t think that I would do it,” stage winner Pinot said afterwards. I wasn’t feeling good on Wednesday but I found my legs again [today].
“I just wanted to have fun and give it a try. It was a nice stage today. I really wanted to attack early.”