Updated

Barcelona, Spain (SportsNetwork.com) - Lewis Hamilton from Mercedes grabbed the lead in the Formula One world championship standings after claiming his fourth consecutive victory of the season in Sunday's Spanish Grand Prix.

Hamilton and teammate Nico Rosberg staged another thrilling battle for the win this season, as Hamilton crossed the finish line just 0.6 seconds ahead of Rosberg. Both drivers finished in that same order in last month's Bahrain Grand Prix, with the margin of victory there one second.

Hamilton started on the pole and only relinquished the lead when he pitted first on lap 22 and then the final time on lap 44. He had an advantage as high as five seconds, but Rosberg cut that margin to less than a second on lap 60.

Mercedes has been the dominant team this year, with Rosberg scoring the victory in the season-opener in Australia and then Hamilton winning the next four grand prix -- Malaysia, Bahrain, China and Spain.

Hamilton scored his 26th career victory, which put him ahead of Jim Clark and Niki Lauda for eighth on F1's all-time race winners list. It's the first time Hamilton has won the Spanish GP in eight attempts.

"Getting my first grand prix win here after trying for eight years, it's very difficult to really put into words the feeling when you come to a race and have a result like this," Hamilton said. "Never have I had a car like this, and obviously, we've never had a gap like this to anyone before. Nico did a fantastic job today. It was a struggle to keep him behind, but I'm grateful that I was able to do it."

Rosberg has now finished second to Hamilton for the fourth straight time. He is also three points behind his teammate in the world championship standings.

"This is a really difficult track to get close to the guy in front," Rosberg said. "I still got close, in turn 10 on the last lap. Could have gone for a kamikaze move, but it wouldn't have worked. Lewis did a great job the whole weekend, and just that little bit ahead. But there's a lot of positives for me to take out of it. I'm fully motivated to just try to get that little bit extra and to edge him out next time, and it's doable."

Daniel Ricciardo from Red Bull earned his first podium finish in F1 with a third-place run, while his teammate, Sebastian Vettel, the four-time defending world champion, finished fourth after starting 15th.

"I think coming into the race today we knew a boring race would be a pretty good one for us," Ricciardo said. "We knew we didn't really have the pace for Mercedes. We looked like a third-place car, and in the end, that's what it was. We had a pretty comfortable third-place, and we just had to focus on getting the tires to last two stops and that was it. Really nice to be on the podium."

Vettel had qualified 10th but received a five-place grid penalty for an unapproved gearbox change following Saturday's qualifying.

"All in all, it was the maximum we could do," Vettel said. "I think fourth was the best we could do today."

Valtteri Bottas from Williams took the fifth spot, followed by Ferrari drivers Fernando Alonso and Kimi Raikkonen. Alonso, a Spaniard, overtook Raikkonen for position with three laps left. He was the last car to finish on the lead lap, while Raikkonen fell one lap behind.

Romain Grosjean from Lotus finished eighth, while Force India teammates Sergio Perez and Nico Hulkenberg completed the top-10.

Alonso is now 51 points behind Hamilton, while Vettel trails by 55.