IT was a race of the driving wounded, but Daniel Ricciardo somehow coaxed his Red Bull Renault over the line to win the Monaco Grand Prix.

Ricciardo, who set a blistering pace in qualifying to claim pole position, was never headed, but the final outcome was in doubt until the second last of the 78 laps of the principalityโ€™s tight street circuit.

The Perth driver was in command from the start, leading Sebastien Vettel in the Ferrari, the Mercedes of Lewis Hamilton, Kimi Raikkonen (Ferrari) and Valtteri Bottas in the second Merc.

But things went askew after Ricciardoโ€™s pit stop for fresh tyres n lap 17.

He reported a loss of power and was being caught by Vettel, who almost simultaneously had troubles of his own with lack of grip.

That led to Hamilton, Raikkonen and Bottas closing in on the leading pair, before Hamilton radioed that he was unable to match their pace

Ricciardoโ€™s technicians were frantically trying to fix the power problem via a software Panadol, but he had to make do with this cryptic message: โ€˜Daniel, youโ€™re doing a really good job, mate, I know itโ€™s tough. Sorry, but youโ€™re going to have to put up with this till the end of the race.โ€™

So he soldiered on, leading Vettel by around 1.2 seconds most of the time with the margin narrowing to 0.4 seconds as the Ferrari closed in on the straights, where it was up to 30km/h faster.

On lap 38, Lance Stroll, who was having a nightmare race in his Williams after a first lap brush with a Sauber, and was running 20th and last, was faster than the leading group.

The most exciting drive was from Ricciardoโ€™s teammate, Max Verstappen, who started from 20th after a crash in practice and a grid penalty for a new gearbox.

He scythed through the field, passing 10 cars in eight laps before becoming embroiled in some fierce battles, first with Charles Leclerc in a Sauber-Alfa and later with Pierre Gasly in a Toro Rosso and Carlos Sainz and Nico Hulkenberg in the Renaults.

Up front, Ricciardo, under instruction to avoid high revs and the lower gears grimlyย  kept his power-depleted Red Bull just ahead of Vettel, who told his pit he was having gearshift hassles in the Ferrari.

Fernando Alonso also reported gearbox problems in his McLaren, and dropped out.

Then there was a dramatic moment when Leclercโ€™s Sauber-Alfa had brake failure on the approach to a corner and whacked into the back of Brendon Hartleyโ€™s Toro Rosso, putting both drivers out.

That resulted in a virtual safety car period which worked in Ricciardoโ€™s favour:ย  Stoffel Van Dorne, a lap down in his McLaren, emerged from pit lane ahead of Vettel, and with just three laps to go, Vettelโ€™s chase was over. He lost five seconds in that incident, leaving Ricciardo to claim his second win of the season and first at Monaco.

It was a terrific, nerve-wracking drive by Ricciardo, and elevated him to third in the drivers’ championship.

โ€˜Amazing, I donโ€™t know how you did it, Daniel,โ€™ Red Bull principal Christian Horner radioed.

Ricciardo replied with just one word: Redemption.

He was assured of victory at Monaco in 2016, only to be thwarted by an unnecessary pit stop.

Behind the leading quintet of Ricciardo, Vettel, Hamilton,Raikkonen and Bottas came Esteban Ocon after a top drive in the Force India, followed by Gasly in the Toro Rosso, Hulkenberg (Renault), Verstappen in the second Red Bull and Carlos Sainz in a Renault.

A delighted Ricciardo admitted luck was on his side.

โ€˜We had a lot to deal with,โ€™ he said.

โ€˜I felt a loss of power and thought the race was done, but we got home only using six gears. Iโ€™m stoked.โ€™

Red Bullโ€™s mysterious problems werenโ€™t entirely over. Their media website was also hit by an unknown bug that resulted in an โ€˜currently down for unplanned maintenanceโ€™ message.

Things might be sorted by the next Grand Prix, in Montreal on June 10.