MONTE CARLO, Monaco -- The feeling in the cockpit must have been awful. For the second time in three years, Daniel Ricciardo could see victory at the Monaco Grand Prix slipping away from him. One hundred and sixty brake horsepower -- roughly the amount that powers a family saloon car -- had gone missing every time he pushed the throttle and his steering wheel display was flashing up with warning message after warning message. There were 50 laps left to run and, at the time, a real danger he wouldn't finish the race.

In the Red Bull garage the situation was just as desperate. The team's reliability engineers were familiar with the problem from their previous experience with Renault's power unit and they knew how catastrophic it could be. The culprit was the MGU-K -- the electrical motor that harvests energy from the rear axle under braking and deploys it on the straight. It offers a 120kw power boost for 33 seconds a lap, and on any other race track its absence would have made Ricciardo vulnerable to attack on the next long straight. In terms of pure lap time, the power boost is worth two seconds per lap at Monaco but the bigger concern was that the issue could very quickly lead to a complete failure of the engine. Although it wasn't relayed to Ricciardo in the car, there was very serious chatter about parking the car before more damage was done.

The honey badger on the back of Daniel Ricciardo's helmet summed up his weekend. Mark Thompson/Getty Images

"Our reliability engineers are looking at saving the engine's components to avoid penalties at future races," Red Bull team boss Christian Horner explained after the race, "so it was like, 'OK, we are likely to ingest a whole bunch of shrapnel from the MGU-K, so we should stop the engine?' But I said no let's keep running and if it stops, it stops. We are leading the Monaco Grand Prix. I discussed it with Adrian [Newey, Red Bull's chief technical officer] and he was in total agreement that we go until it smokes."

Had it not been for some crisis management within the cockpit, that smoke could quickly have been coming from the rear brakes. An F1 car's MGU-K harvests so much energy from the rear axle that the FIA has mandated that the rain light act as a warning to following cars when it's in use because of deceleration it causes. The stopping power of the current MGU-K also required a change to the technical regulations when it was introduced so that the rear brakes were controlled electronically -- or 'by wire' -- in order to marry the driver's desired braking input with the resistance provided by the MGU-K. The technology proved troublesome when it was first introduced in 2014, but over the past four years it has been finely tuned to provide both braking 'feel' for the driver and energy for the hybrid's batteries.

However, when the MGU-K is no longer functional the rear brakes have to compensate for the lost deceleration, and in doing so can quickly overheat. With the help of his race engineer Simon Rennie, Ricciardo needed to tailor his car's settings to stop another failure emerging on his increasingly fragile Red Bull.

"Of course when you lose the MGU-K that changes all the energy movement through the braking system of the car," Horner explained. "So, his rear brakes immediately were not far off going on fire. He then had to wind the brake bias all the way to the front. And at the same time, we are telling him that he needs to start lifting in the braking areas to generate as much cooling as he could on the brakes."

Daniel Ricciardo kept Sebastian Vettel at bay to win the 2018 Monaco Grand Prix. Xavier Bonilla/NurPhoto via Getty Images

After the race, Ricciardo revealed he moved the brake balance seven percent forwards, meaning the front brakes were doing far more work than the rears. To put that percentage in perspective, drivers usually change their brake balance by a single percentage as they adjust to the car's lowering fuel load over the course a race, but from one lap to the next Ricciardo was completely changing the feel of his car when he hit the brakes.

On the downhill approach to Monaco's Nouvelle Chicane -- the hardest braking point on the circuit -- 142kg of force is required on the pedal to slow the car. With his brake balance pushed so far forwards Ricciardo was now having to moderate that pressure to avoid a lock up that could have seen him sail wide and concede the lead. He was also lifting off the throttle earlier than usual to give his brakes less punishment when he needed them, and all this while making sure the scarlet Ferrari in his rear mirrors didn't chance its luck with an overtaking move on the inside.

"He could have been in Apollo 13, I tell you, with the way he was dealing with the issues today," Horner said. "It was an incredible performance from him and just extremely mature."

If that wasn't enough, Pirelli's ultra-soft compound tyres were providing an additional challenge up and down the field. Cloud cover meant track temperatures were relatively cool, causing the rubber on the front tyres to grain as the compound scrubbed across Monaco's smooth track surface. The issue was worse for the Ferrari and Mercedes behind, but Ricciardo was being forced to take more life out of his tyres in the corners to compensate for the lack of power on the straights. The two key areas were Portier ahead of the tunnel and Anthony Noghes ahead of the pit straight, which precede the two biggest overtaking opportunities.

Daniel Ricciardo celebrates victory with Red Bull team boss Christian Horner. Xavier Bonilla/NurPhoto via Getty Images

"He had three laps where he pushed really hard in the corners because he was nervous about how slow he was at the end of the straight, so we just left him alone for a few laps to find a rhythm," Horner said. "He had all the brake temperature warnings that he could see on the dash, so he was just trying to get those under control.

"But in the race he was asking for a lot of information about Max's tyres, how they were lasting. Which was the tyre that gave up first? The left front or left rear? He was asking about Hulkenberg. How far did his tyres go? He also had the capacity to be thinking about the global picture because he knew he had to take more out of the tyres then he really wanted to, but still didn't want to kill them."

The combination of issues meant the race was run at a significantly reduced pace compared to normal. It was a viable strategy for Ricciardo due to the difficulty of overtaking at Monaco and the relative ease of keeping Vettel behind, but it also served to eke out the torture he was experiencing in the cockpit.

"I was using six gears pretty much the whole race, I didn't touch seventh or eighth," Ricciardo said. "I think all weekend we're not really using eighth, so I think it shows that even with an extreme loss of power our chassis still works really well. Fortunately this isn't a power circuit, so I think the circuit certainly helped us here. It's proven again we have a really good chassis.

"The pace was slow, due to the loss of power, the pace was slow to manage the tyres and then the pace was slow because I was managing brakes. Hence why it felt like a very long race but obviously we got it home."

There was not only relief in the cockpit when Ricciardo crossed the line but also an overwhelming sense of redemption. Two years earlier, the Australian saw a straightforward victory at Monaco slip away when his pit crew weren't ready for him as he arrived in the pits for his mandatory tyre change. The podium celebrations afterwards were one of the few occasions in which we saw a glimpse of the 'other side' of Ricciardo's personality, as he slammed his team for "screwing" him over. Sunday's victory helped bring closure.

"I guess, for me in that race, trying to figure out what was going on, it's hard to kind of let it all sink in, once it's done," he said after stepping out of the car. "Even now, I don't know, it feels weird that I got that win.

"Obviously it's a long weekend here with the practice on a Thursday, it stretches the weekend an extra day so it's a long week. There's obviously a lot of hype -- I mean I love it, it is the most fun weekend of the year but it is pretty draining. You're just trying to control everything until the moment of the race. I kind of wish the race was at ten in the morning so we could just get it done already!

"Going through all that and then finally starting, getting a good start, that was really the key moment and then obviously, as I mentioned, the problems I had, that obviously threw a lot of doubt in my mind for a few laps. Every lap I got by with no extra problems was a little victory so happy to see the chequered flag."

Ricciardo's famous celebratory plunge into the pool after winning in Monaco became a standout image of F1's 2018 season. Peter Fox/Getty Images

His second win in six races has also made Ricciardo more valuable to Red Bull than at any point in the last two years -- useful timing given his contract is due to expire at the end of the year. The recent poor performances of teammate Max Verstappen, who is now on a much more lucrative contract than Ricciardo after re-signing with Red Bull last year, is only serving to underline Ricciardo's rising stock and the Dutchman's weekend in Monaco was ruined by another silly mistake.

The championship standings help bolster Ricciardo's bargaining power too, with the Australian now on 72 points to his teammate's 35 and 38 points off Hamilton despite two retirements. Given the competitive situation at the front, Red Bull wouldn't be blamed for backing Ricciardo over Verstappen in the coming races (although given the contractual situation of both drivers that seems unlikely).

But when it comes to putting pen to paper, Ricciardo's future at Red Bull is more likely to hinge on the next race in Canada than his performance in Monaco. Both Renault and Honda -- the engine supplier of Red Bull junior team Toro Rosso -- are set to debut significant updates to their power units in Montreal and the outcome of those upgrades will form the basis of Red Bull's engine decision for 2019.

If a significantly improved power unit from either manufacturer can form part of Red Bull's package for next year, Ricciardo will have little reason to look elsewhere this summer. But if neither Honda nor Renault show promise in the coming races, Ricciardo knows he can no longer waste precious years of his career driving an underpowered car.

The most impressive performance of his career to date came may have come with a significant power deficit, but to win a championship he needs an engine to match his talent.