QUIMPER, France — Chris Froome could thank his Team Sky colleagues for keeping him out of danger — and helping him overcome a mechanical problem — in the race's first hilly stage.
Overall race leader Greg Van Avermaet, clad in yellow, mistimed his sprint. Sagan, the three-time reigning world champion with the Bora-Hansgrohe team, took advantage to earn his second victory in this year's event.
"I don't know if he did it on purpose, or if he wanted to drop everybody," Sagan said, "but I have to say thanks."
Van Avermaet still increased his overall lead over BMC teammate Tejay van Garderen to two seconds by gaining precious time in an intermediate bonus sprint.
After a move from Philippe Gilbert, Van Avermaet accelerated out of the final turn with 300 yards to go but couldn't maintain his pace.
"I tried to win the stage, but it was pretty complicated," Van Avermaet said. "Phil went early, and he's still pretty close on GC (general classification) so I couldn't let him go. I think I went too early in the sprint. I thought the corner was closer to the finish than it really was."
In a repeat of Sunday's second stage, Sagan held off Sonny Colbrelli in the sprint, with Gilbert finishing third.
Sagan clocked nearly five hours over the undulating leg through the region of Brittany, which contained five categorized climbs over a 127-mile route from Lorient to Quimper and resembled a single-day classic.
Gilbert, a former world champion, moved up to third in GC, three seconds off Van Avermaet's pace. Froome, the four-time Tour winner who trails Van Avermaet by 57 seconds in 15th, finished in the main pack with the other favorites.
There was a nervous moment for Froome when he had to stop due to a mechanical problem with 43.5 miles remaining. Teammate Michal Kwiatkowski attempted to fix it, but Froome was later forced to stop again and change his bike. Kwiatkowski and two other teammates then quickly escorted Froome back to the peloton.
Froome and Team Sky were also at the front in the finale, ceding the lead to the stage hunters only in the final mile.
"Everyone knew that was going to be a tricky finish today, a very undulating day — never really flat — just up and down," Froome said. "A nice day to have behind us. It's the kind of stage where something can be wrong, and you quickly find yourself losing 30 to 40 seconds if you get caught out of position. It was a day to stay up front and really stay on it."
Seven riders broke away five miles into the stage. The group established a lead of about four minutes as it wound along the Atlantic coast through picturesque towns such Riec-sur-Belon, famous for its oysters, and Pont-Aven, which inspired artists including Paul Gauguin.
While Brittany is usually rainy and windy, this time it was sunny and racing conditions were perfect. Fans waving the black-and-white striped flag of the region swarmed the climbs.
Sylvain Chavanel, the 39-year-old Frenchman riding in a record 18th Tour, launched a solo attack from the breakaway with more than 60 miles remaining but didn't get far.
France's Elie Gesbert, another member of the breakaway, crashed on a short descent, ended up in a ditch and appeared to scrape his face along a stone wall before he got back on his bike and continued.
Lilian Calmejane and Tom Skujins, the last remaining members of the breakaway, were caught by the main pack with six miles to go.
The 21-stage race remains in Brittany for today's sixth stage, another hilly leg that will cover 112 miles from Brest to Mur-De-Bretagne Guerledan, including two climbs of the short but steep Mur-de-Bretagne.
"We always see a bit of action there," Froome said. "I sometimes prefer those stages to the fast, flat stages."