Pantano out-sprinted Sergei Chernetckii (Katusha) and third-placed Jon Izaguirre (Movistar).
Lopez becomes the first Colombian rider to win the Swiss race, 12 seconds overall ahead of Izagirre and 18 clear of Warren Barguil (Giant-Alpecin) in third.
I knew that my opponents would try to attack me then I attacked myself. It went well". - Miguel Angel Lopez.
The breakk of the day was crafted by Jasper Stuyven (Trek-Segagredo), Magnus Cort (Orica-GreenEdge) and Maximiliano Richeze (Etixx-QuickStep).
Richeze put the effort to goo use, winning the two intermediate sprints and securing the overall win in the points classification.
The trio built up a gap of one minute before they started on the 13.5 km towards the top of the Flüelapass.
Astana kept a steady pace in the peloton until Darwin Atapuma (BMC) took the front and thinned out the group significantly.
Simon Spilak (Katusha), Rui Costa (Lampre-Merida) and Pantano then attacked with 22km left to go.
Under threat of losing his race lead, Lopez attacked and quickly joined the leading trio together with Tejay Van Garderen (BMC).
A few kilometers to the top, Lopez attacked once again and this time, nobody could follow him. He crossed the top, 30 seconds ahead of the first chase group.
On descent, with 9km to go, Izagirre, Chernetsky, Pantano and Van Garderen joined Lopez at the front. Barguil and Costa tried hard to bridge across as well but without luck. In the sprint, Pantano went early and even though Chernetsky came close on the final meters, the Colombian had enough energy left in the legs to take his first WorldTour victory.
Lopez finished fourth on the stage, which was enough for him to keep the yellow jersey and be the first Colombian rider to win Tour de Suisse.
Izagirre moved up to second overall, while Barguil rounded off the podium in third place. Antwan Tolhoek (Roompot-Oranje Peloton) won the KOM classification. Katusha topped the overall team ranking.