Three-time champion Roglic takes red jersey after fourth stage of Vuelta a Espana
On a baking hot 170km fourth stage in which the peloton crossed from Portugal into Spain for the first time, Roglic burst past Lennert van Eetvelt (Lotto Dstny) to snatch the win.
Belgium's Van Eetvelt paid the price for celebrating what would have been a maiden Grand Tour stage win too early, raising his arm in triumph then banging his handlebars in frustration as Red Bull-Bora Hansgrohe rider Roglic sneaked past on the line.
Slovenian Roglic moved into the overall race lead for the first time, taking the red jersey from Belgium's Wout Van Aert.
"It was not the main objective of the day (to win the stage)," Roglic told Eurosport. "But when you see the guys fighting hard in this heat I was happy to finish it off."
The first day for the GC contenders to play their cards saw Roglic put down a marker while Portugal's Joao Almeida (UAE Team Emirates) finished third on the stage and is second in the overall standings, eight seconds back.
Spaniard Enrique Mas also finished strongly and is third overall 32 seconds back while compatriot Mikel Landa made an impressive late surge to reach the front before being overtaken.
But it was a disappointing day for American defending champion Sepp Kuss (Visma–Lease a Bike) who lost 28 seconds to Roglic and is more than one minute behind overall.
A tough stage featuring four categorised climbs was decided on the last of them as the two remaining members of a breakaway group - Pablo Castrillo and Bruno Armirail - were caught.
The 14km Pico Villuercas climb topped out at 20% gradients in places, shredding the lead group with several big names unable to stay in contact with the front.
Landa launched the first attack inside the kilometre but was unable to sustain it and it was left for Van Eetvelt, Roglic, Mas, Almeida and Felix Gall to fight it out.