Just hours after Vincenzo Nibali was thrown off the race for being towed back to the pack after a crash on stage two, the Slovakian won a sprint finish.
Orica-Greenedge's Colombian rider Esteban Chaves retained the race leader's red jersey by five seconds.
Britain's Tour de France winner Chris Froome finished 19th and sits eighth overall, 40 seconds behind.
Froome is chasing a Vuelta-Tour double that has been done just twice before.
He will no longer be competing against Nibali of Italy, who was regarded as one of the favourites for victory, while Fabian Cancellara (Trek) abandoned midway through the stage through illness.
The Swiss was using the race as preparation for September's Road World Championships in Virginia, USA.
Stage three result:
1. Peter Sagan (Tinkoff-Saxo) four hours, six minutes, 46 seconds
2. Nacer Bouhanni (Cofidis) Same time
3. John Degenkolb (Giant-Alpecin) Same time
4. Jean-Pierre Drucker (BMC) Same time
5. Maximiliano Richeze (Lampre-Merida) Same time
6. Kristian Sbaragli (MTN-Qhubeka) Same time
7. Mitchell Docker (Orica GreenEdge) Same time
8. Jasper Stuyven (Trek Factory) Same time
9. Vicente Reynes (IAM) Same time
10. Tom van Asbroeck (Lotto NL-Jumbo) Same time
General classification after stage three:
1. Esteban Chaves (Col/Orica) eight hours, four minutes, one second
2. Tom Dumoulin (Ned/Giant) +05secs
3. Nicolas Roche (Ire/Team Sky) +15secs
4. Daniel Martin (Ire/Cannondale) +24secs
5. Joaquim Rodriguez (Spa/Katusha) +35secs
6. Nairo Quintana (Col/Movistar) +36secs
7. Alejandro Valverde (Spa/Movistar) +38secs
8. Chris Froome (GB/Team Sky) +40 secs
9. Daniel Moreno (Spa/Katusha) Same time
10. Fabio Aru (Ita/Astana) +47secs
Peter Sagan raced to his first Grand Tour victory in more than two years on stage three of the Vuelta a Espana.