BERN, Switzerland — Peter Sagan showed off his world champion qualities, timing his sprint perfectly to win the 16th stage of the Tour de France in a photo finish as the race crossed into Switzerland Monday.
Sagan, a Slovakian with the Tinkoff team, edged Alexander Kristoff of Norway at the line.
Kristoff thought he won and pumped his fist in celebration, only to learn seconds later he hadn't.
Chris Froome held on to the yellow jersey entering the second and final rest day.
It was Sagan's third stage win in this Tour and the seventh of his career.
Sondre Enger, another Norwegian, crossed third.
The rolling 209-km (130-mile) stage from Moirans-en-Montagne to the Swiss capital of Bern resembled the route of a single-day classic, with a section on cobblestones before a slight uphill finish.
Sagan is a specialist at stages like this, which exalt his unique blend of characteristics: He's a punchy rider able to ride strong over short climbs, and a top sprinter.
He was greeted at the finish by a large contingent of fans waving Slovakia flags.
Sagan also won Stage 2, which followed a similar course, in a sprint. Then he took Stage 11 after leading a late breakaway.
Sagan also won the world title with a late breakaway in the US last year.
Froome kept his 1-minute, 47-second lead over Dutch rider Bauke Mollema, with Britain's Adam Yates in third, 2:45 back.
There was a minute of silence at the start of the stage to pay tribute to the 84 victims of the truck attack in Nice. It was the third of three days of national mourning in France following the Bastille Day attack.
A big black banner hanging from a bridge leading into Bern read, "Solidarity with Nice."
The stage was the perfect tribute to Swiss standout Fabian Cancellara, who is from Bern.
Cancellara, who has won seven Tour stages in his career and worn the yellow jersey for 29 days, is retiring at the end of this season.
The peloton crossed into Switzerland midway through the leg, riding through lush, green valleys with views of snow-capped mountains before crossing through the medieval center of Bern, which is a UNESCO World Heritage site.
Etixx-Quickstep teammates Julian Alaphilippe and Tony Martin, a three-time time trial world champion, got in an early breakaway and established a lead of more than five minutes on the peloton before being reeled in with slightly more than 20 kilometers to go.
Former world champion Rui Costa then launched a solo attack but Sagan preferred to wait until the Portuguese rider was caught, and take his chances in the bunch sprint.
Tuesday is the race's second and final rest day, which will be followed by four challenging climbing stages in the Alps before Sunday's mostly ceremonial finish in Paris.