Fernando Alonso took Ferrari's first win of 2011 with a stunning drive at a thrilling British Grand Prix.

The Spaniard took the lead following a pit-stop problem for Red Bull's Sebastian Vettel but the Ferrari had genuine race-winning pace.

Vettel was left to fend off team-mate Mark Webber, who was told to hold position by team boss Christian Horner.

Lewis Hamilton finished fourth, holding off Ferrari's Felipe Massa in an exciting last-lap duel.

Jenson Button retired following a problem at his final pit-stop, when he set off to rejoin the race without a wheel nut on his right front wheel and he had to stop in the pit exit.

Vettel's race also turned on a pit error. The German took the lead at the start from Webber, who began from pole, as the drivers had to cope with tricky conditions on a track that was wet over half its length but dry over the other.

The Red Bulls appeared to be in control early on in the mixed conditions, with Vettel leading Webber, and Hamilton taking third from Alonso on lap 15 with a brilliant move at the fast Copse corner.

But as the track dried, the race turned on its head.

Alonso started to pump in fastest laps, closing on Hamilton and re-passing him on lap 24, and then on the Red Bulls.

He and Vettel came in on the same lap, 27, for their penultimate stops, and a delay fitting the left-rear wheel to the Red Bull enabled Alonso to pass Vettel in the pits and take the lead.

Vettel rejoined behind Hamilton and was unable to overtake him on the track as Alonso extended his lead with another run of impressive fastest laps, building it to 10 seconds by the time the Red Bull made its final pit stop.

The German managed to jump Hamilton, who came in on the next lap, but although Vettel was now second behind Alonso, the Ferrari continued to pull away to victory.

Vettel admitted that Ferrari had deserved their victory: "I think you have to accept fair and square Ferrari beat us today.

"There has been a bit of a trend over the last couple of races, they have been very strong on race days, so it shows us we need to keep pushing and improving the car."

He added: "It would have been a tight race because Ferrari had very good pace. It was not just us being unlucky and finishing second because of a mistake. Fernando was very competitive."

A delighted Alonso hailed his Ferrari colleagues as he spoke of his victory.

"It is a special event for every driver competing in F1, we know the history of this race, a special grand prix and I had the privilege to drive (this morning) the Froilan (Gonzalez) car that was the first Ferrari win in F1," he said.

"Today we won in the same circuit with the same passion, the same group of people who work for this fantastic team. This is the big thing about Ferrari, the passion, the victory and the love for victory."

British Grand Prix result:
1. Fernando Alonso (Spa) Ferrari
2. Sebastian Vettel (Ger) Red Bull-Renault
3. Mark Webber (Aus) Red Bull-Renault
4. Lewis Hamilton (GB) McLaren-Mercedes
5. Felipe Massa (Brz) Ferrari
6. Nico Rosberg (Ger) Mercedes GP
7. Sergio Perez (Mex) Sauber
8. Nick Heidfeld (Ger) Renault
9. Michael Schumacher (Ger) Mercedes GP
10. Jaime Alguersuari (Spa) Toro Rosso-Ferrari

Championship standings:
1. Sebastian Vettel (Ger) Red Bull-Renault 204 pts
2. Mark Webber (Aus) Red Bull-Renault 124
3. Fernando Alonso (Spa) Ferrari 112
4. Lewis Hamilton (GB) McLaren-Mercedes 109
5. Jenson Button (GB) McLaren-Mercedes 109
6. Felipe Massa (Brz) Ferrari 52
7. Nico Rosberg (Ger) Mercedes GP 40
8. Nick Heidfeld (Ger) Renault 34
9. Vitaly Petrov (Rus) Renault 31
10. Michael Schumacher (Ger) Mercedes GP 28

Constructors' championship:
1. Red Bull-Renault 328 pts
2. McLaren-Mercedes 218
3. Ferrari 164
4. Mercedes GP 68
5. Renault 65

BBC Sport