(CNN) -- Pastor Maldonado grabbed his first Formula One victory as the Venezuelan impressively held off Ferrari's Fernando Alonso to win Sunday's Spanish Grand Prix, but his celebrations were muted by a fire in his team's pit-lane garage.
In only his second Formula One season, Maldonado secured Williams' first win since 2004 despite losing the early advantage of his pole position, thanks to some timely pit stops after Alonso raced away from him at the start.
Maldonado's second pit stop proved key to his victory and Alonso then had to work hard to hold off Lotus' Kimi Raikkonen, with the Finn's teammate Romain Grosjean finishing fourth, while Kamui Kobayashi of Sauber was fifth and Red Bull's Sebastian Vettel sixth.
Alonso and defending champion Vettel are tied on points in the 2012 standings after a race that produced the season's fifth winner in five races, though the German driver stays ahead on count back.
Maldonado had started on pole after McLaren's Lewis Hamilton was relegated to the back of the grid on Saturday because of a technical fuel breach, which resulted in the exclusion of all the Briton's qualifying times by the race stewards.
Hamilton fought up from the back of the grid to eighth, with teammate Jenson Button taking ninth.
"I think it's a wonderful day, not just for me but for all the team," said Maldonado. "We have been pushing so hard since last year to try to improve race by race and here we are."
Spaniard Alonso added: "Second place at home feels fantastic and thanks to the people that came here and the people at home and hopefully a step forward in terms of championship possibilities."
However Williams' celebrations at Maldonado's win were marred after a fire broke out in the team's garage just over an hour after the race finished as the Barcelona pit lane was engulfed in thick smoke.
A number of personnel from the Williams, Force India and Caterham teams were taken to the medical center, though no serious injuries have been confirmed.
Of the 31 people taken to the medical center, 24 were released and the remaining seven were transferred to local hospitals for treatment.
"All the team's employees have been accounted for and four people have been taken to the circuit medical center for examination; one with a minor hand injury and three with respiratory issues," said Caterham.
Formula One's governing body the FIA and the Spanish authorities have opened an investigation into the fire.
Meanwhile, Mercedes driver Michael Schumacher's collision with Williams' Bruno Senna on lap 12 proved costly for Germany's seven-time world champion, who was handed a five-place grid penalty for the Monaco Grand Prix later this month.
Race stewards decided Schumacher was at fault in the incident which forced the retirement of both drivers.