The Slovakian stayed at the front of the peloton on the last, long climb to Norwood summit, which took out of contention the sprinters who have dominated the tour through its first three stages. On the descent, Sagan dropped in behind the leaders as they flattened out and made the final turn toward the finish.
He followed South African Daryl Impey, coming off his wheel to hit the finish line first and claim the 102nd stage win of his professional career. Impey was second, just a fraction behind, and moved into second place overall, just two seconds behind Sagan.
Sagan's BORA-hansgrohe teammate Jay McCarthy moved to third place overall, nine seconds behind the leader, after he was fifth on the stage. Sagan, who started the day in fifth place overall, said Friday's stage was among the hottest he had experienced but not the worst.
"We did a Tour of California five years, a stage in Palm Springs, and two guys from the peloton just fell down from the bicycle, so that was really bad," he said. This year's Tour winner will likely be decided on Saturday's Queen stage — the fifth of its six stages. Ending on the summit of Willunga Hill, the 151.5km (94.1 miles) stage is the most demanding of the event.
"For sure tomorrow is a much harder stage than today," Sagan said. "Tomorrow is going to be a different story." Andre Greipel, who led after winning the first stage, and Caleb Ewan, who took over the lead when he won the second stage and held it after Elia Viviani won Thursday's third stage, were among those who dropped out of contention.
Australian riders Zac Dempster and Alex Porter of the UniSA team took part in a breakaway and led the race in the scorching heat, sharing the points and time bonuses available from the intermediate sprints and King of the Mountain sections.
They led at one point by almost nine minutes but were gradually hauled back to the peloton. Porter dropped back first and Dempster led the race on his own for almost 30 kilometers before also rejoining the bunch.
Sagan remained prominent throughout, after being involved in all of the bunched sprints of the first three stages. This finish suited his talents to a much greater degree and he timed his finish perfectly to win his first Tour Down Under Stage.