Froome attacked with 7.7km to go, with only Esteban Chaves (Orica-Scott) able to follow on the slopes of the Alto de la Comella. That duo led over the top of the climb and onto the descent towards the finish, where they were joined first by Romain Bardet (Ag2r La Mondiale) and Fabio Aru (Astana), and then by a larger chasing group including Nibali, Tejay Van Garderen (BMC Racing), and others.
Making the junction within the final kilometre, Nibali took a few seconds to recover in the wheels before accelerating clear. The Italian crossed the line a few bike lengths ahead of his rivals for a relatively comfortable win.
Behind it was David de la Cruz (Quick-Step Floors) who was the best of the rest, while Froome crossed the line third to pick up four bonus seconds which, in addition to the two seconds he won at the intermediate sprint, were enough to move him into the leader's red jersey.
How it happened
The third stage of the Vuelta a España saw the riders hit the mountains for the first time with a 158.5km stage from Prades to Andorra la Vella.
With the course climbing from the start, four riders escaped early: Thomas De Gendt (Lotto-Soudal), Anthony Turgis (Cofidis), Fabricio Ferrari (Caja Rural-Seguros RGA), and Davide Villella (Cannondale-Drapac). They were joined by Fernando Orjuela (Manzana Postobon), Przemyslaw Niemiec (UAE Team Emirates) and Alexandre Geniez and Axel Domont (Ag2r La Mondiale) to form an eight-strong lead group who quickly built a lead of more than four minutes.
Those eight riders were kept on a relatively close leash by Quick-Step Floors, working for the red jersey of Yves Lampaert, with the action only starting with 55km remaining.
With a team-mate alongside him in the break, Domont decided to take a gamble, attacking out of the move with 55km remaining and quickly opening an advantage of 25 seconds.
However Domont was caught by his breakaway companions by the penultimate climb, the Coll de la Rabassa,with Geniez, Villella, and Ferrari going clear.
Back in the peloton, Team Sky had moved to the front to put in an injection of pace that immediately put the red jersey of Yves Lampaert in trouble. One man who wasn't in trouble was Antonio Pedredo (Movistar), the Spaniard attacking out of the peloton to open a small gap, with Rui Costa and Darwin Atapuma (UAE Team Emirates) going after him.
However Sky's pace was unrelenting, first catching Pedredo and Costa as they crested the climb with just over 30km remaining, then reeling in Villella and Geniez on the descent.
After the bonus sprint, where Froome surged out to take two bonus seconds - being pipped to the line by team-mate Diego Rosa, the riders started the climb with 12km remaining.
Gianni Moscon was the man to set the pace, hitting the early slopes hard with Froome in his wheel. The Italian acceleration was too much for all but a few riders, with Alberto Contador (Trek-Segafredo) among those to be tailed off the back.
Moscon didn't last for long, handing over to Mikel Nieve at the head of a front group that was by then reduced to 13 riders.
With 7.7km Froome accelerated hard, with only Chaves able to follow. The Brit immediately opened a gap of nearly 15 seconds, before Aru and Bardet countered, crossing the top of the climb just a few seconds behind the leading duo.
After a technical high-speed descent, Aru and Bardet gained contact with the leaders with just over three kilometres remaining, but with a chasing group making contact with 800m remaining.
Nibali was one of the men in the chasing group, and took a moment to compose himself before accelerating with 350m to go - a move that no one could match.
The Italian crossed the line a couple of bike lengths ahead of the rest of the group, who were led home by De la Cruz and Froome, who took more bonus seconds to move into the race lead.
Vuelta a España 2017, stage three: Prades to Andorra la Vella, 158.5km
1. Vincenzo Nibali (Ita) Bahrain-Merida, in 4-01-22
2. David De La Cruz (Esp) Quick-Step Floors
3. Christopher Froome (GBr) Team Sky
4. Romain Bardet (Fra) Ag2r La Mondiale
5. Esteban Chaves (Col) Orica-Scott
6. Fabio Aru (Ita) Astana
7. Nicolas Roche (Irl) BMC Racing
8. Tejay Van Garderen (USA) BMC Racing
9. Domenico Pozzovivo (Ita) Ag2r La Mondiale, all at same time
10. Michael Woods (Can) Cannondale-Drapac, in 25 secs
General classification after stage three
1. Christopher Froome (GBr) Team Sky, in 8-53-44
2. David De La Cruz (Esp) Quick-Step Floors, at 2 secs
3. Nicolas Roche (Irl) BMC Racing, at same time
4. Tejay Van Garderen (USA) BMC Racing, at same time
5. Vincenzo Nibali (Ita) Bahrain-Merida, at 10 secs
6. Esteban Chaves (Col) Orica-Scott, at 11 secs
7. Fabio Aru (Ita) Astana, at 38 secs
8. Adam Yates (Aus) Orica-Scott, at 39 secs
9. Domenico Pozzovivo (Ita) Ag2r La Mondiale, at 43 secs
10. Romain Bardet (Fra) Ag2r La Mondiale, at 48 secs
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1