BARCELONA - Lewis Hamilton took over the leadership of the Formula One drivers championship on Sunday when he made it four wins in a row by grabbing a heart-stopping victory in the Spanish Grand Prix. He finished just 0.6 seconds ahead of his Mercedes team-mate Nico Rosberg to move on to 100 points for the season and into the lead of the title race ahead of Rosberg, on 97.Australian Daniel Ricciardo came home third for Red Bull ahead of his team-mate, defending four-time world champion Sebastian Vettel of Germany, who had started from 15th on the grid. The win was Hamilton's fourth this year, his first in Spain and the 26th of his career while Mercedes one-two stamped their complete supremacy on the constructors' championship which they now lead by more than 100 points.Finn Valtteri Bottas finished fifth for the resurgent Williams team, ahead of local hero and two-time champion Fernando Alonso and his Ferrari team-mate 2007 champion, Kimi Raikkonen of Finland. Frenchman Romain Grosjean was eighth for Lotus, signaling their return to some form after a dismal start to the year, ahead of Mexican Sergio Perez and his Force India team-mate German Nico Hulkenberg, who was 10th. The race began in balmy, but slightly more humid conditions after overnight rain. The track temperature was 37 degrees Celsius and the air 24 shortly before the lights went out. At the start, the two Mercedes made a clean joint departure while behind them Bottas moved forward to claim third ahead of Ricciardo on the run to the first corner, the longest start straight of the season.Hamilton opened up a 1.1sec lead on the first lap as the two Mercedes pulled clear of the field by around a second a lap. By the end of lap two, his lead over Rosberg was 1.9sec, a gap that he struggled to increase. Rosberg remained determinedly on Hamilton's tail through the early laps as Vettel, from 15th at the start, worked his way to 13th before making an early pit-stop on lap 13, emerging at the back of the field to start a renewed charge.As this unfolded, Venezuelan Pastor Maldonado added to the Lotus team's repair bill and frustrations by colliding with Swedish rookie Marcus Ericsson's Caterham. He damaged the car and collected a five-second penalty. Ricciardo, in the second Red Bull, pitted after 15 laps and had to wait until Bottas came in six laps later to take third place, by which time Hamilton, on lap 19, and most of the rest, had also been in.That gave Rosberg the lead from lap 19 to 22 when the original order was restored, but with the Briton, on the harder tyres offered by Pirelli, and the German continuing on the softer option. Rosberg's first pit stop, in 2.9sec, was a full second faster than Hamilton's, but once the chase resumed, he found it difficult to prevent the Englishman from opening up a lead that reached 4.5sec by lap 30. Hamilton had complained of over-steer. "My rear end is everywhere," he radioed to the team on lap 29 - but it appeared to have little affect. By lap 32, when Rosberg produced a fastest lap to cut the gap to 4.1sec, the front pair were nearly 25sec clear of third-placed Ricciardo and Hamilton's lead seemed stabilised at more than four seconds. In the 'others' race for third place and beyond, Vettel reached the top ten by half-distance and maintained a consistent and aggressive pace as he worked his way into the top six.After their respective second stops after laps 43 and 45, in which Rosberg again 1.3sec in the pits, Hamilton emerged with a lead of 4.6sec. Rosberg cut into it rapidly and as the laps counted down, with just a handful to go, it was cut to less than two seconds. A dramatic conclusion was inevitable when, with six laps remaining, the gap was only 1.2sec and Vettel was closing, from fifth, on Bottas while Alonso was attacking Ferrari team-mate Raikkonen for sixth. "Think about your overtaking strategy," his race engineer told Rosberg as Hamilton remained ahead by 1.2sec. Almost immediately, Alonso schemed a passage past Raikkonen in a thrilling multi-move overtake. As they began the final lap, Hamilton led by just four-tenths. Rosberg cut that to just four car lengtths and threatened a thrilling victory over the line, but the Briton hung on to triumph by just half a second.