But before entering the final Montjuic circuit, the second intermediate sprint saw Ayuso take the win and gather that 1 second back, putting himself back in the provisional lead once again - with the accumulate of finishing positions becoming the deciding factor. As soon as the riders entered the final circuit the attacks began to come but the truth is the pace was very high and no-one managed to go far.
With three laps to go Primoz Roglic hit the front right at the bottom of the climb to Montjuic, pushing the pace to the limit before sprinting over the top, opening a gap to Egan Bernal and Juan Ayuso who followed in the wheel. He began to build a solo lead, then chased by Quinn SImmons and Simon Yates.
The two were caught by a strong attack from Enric Mas in the peloton, but into the final lap there was only a peloton chasing the Slovenian despite Ayuso's struggles. In the final ascent
Lennert van Eetvelt and
Laurens de Plus moved from the peloton to chase the Slovenian, but had to settle for minor places and Roglic truly showed his top level and took a brilliant stage win, conquering the overall classification in the process.