Pantano (Trek-Segafredo) finished ahead of Vegard Stake Laengen (UAE Team Emirates) while Matej Mohoric (Bahrain-Merida) claimed third at the end of the 212km stage from Llivia to Vielha.
"We knew that today would be the day for the breakaway to go until the end and we took the opportunity,” Pantano said.
“I know Laengren, we were team-mates at IAM Cycling, so we had a good understanding and worked together quite well.
"After having some problems after Paris-Nice and feeling a bit sick when I came here, I finally could grab a victory. I had a few rough days indeed, but that's cycling, you have good days and bad days."
Valverde, who finished 8th on the stage, remains 16 seconds ahead of Egan Bernal (Sky) in the general classification and 26 clear of his Movistar teammate Nairo Quintana, in third.
It’s clear that the toughest mountains are now over, but these two days ahead will be really tricky," Valverde said. There’s rain scheduled for tomorrow, and that will make for a tougher course.
"We’ve got just sixteen seconds, and before we finish in Montjuïc on Sunday, this is not done. Still, I think it’s down to Bernal to go and seek for a place to attack to put some seconds on us – we should just focus on defending our position.
"I’m feeling strong at the moment, and should everything go just ‘normal’, we should have no problems, but there’s always something which could arise: punctures, crashes, even bad weather can hurt you and make you lose everything. I’m closer to the overall win, but this is not sealed at all.”