Although this was a relatively flat stage ahead of the Alpine challenges to come, the tight technical finish in Berne - which included a sharp cobbled climb two kilometres from the finish - was thought to suit the likes of Sagan and so it proved
However, it was far from straightforward as sprint specialists Marcel Kittel and John Degenkolb survived that late climb alongside Sagan and Kristoff.
Katusha's Kristoff opened up the sprint first and the Norwegian looked to have all the advantage he needed, but Tinkoff's Sagan threw his bike forward at the line and snatched a win which all but ends the competition for the points leaders' green jersey.
Trek-Segafredo's Fabian Cancellara, the 35-year-old Berne native in his final Tour de France, had to settle for sixth place.
Froome crossed the line 13th, alongside his principle rivals for yellow on the same time as the leaders.
Team Dimension Data had hoped to make an impression to repeat Steve Cummings' emotional Nelson Mandela Day victory of a year ago, but Edvald Boasson Hagen could not find space in the final sprint and came home ninth.
His team-mate Mark Cavendish, winner of four stages in this Tour, stayed with the final group on the cobbled climb but did not have the legs to engage in the sprint and rolled home in 22nd place.
The result leaves Froome one minute and 47 seconds clear in the yellow jersey, with Trek-Segafredo's Bauke Mollema second.
Briton Adam Yates of Orica-BikeExchange is third, two minutes and 45 seconds back and leading the young riders' classification, with Movistar's Nairo Quintana fourth, a further 14 seconds down.