Former F1 driver Jolyon Palmer, who left Renault during the 2017 season, has joined the BBC team to offer insight and analysis from the point of view of the competitors.

Mercedes Formula 1 boss Toto Wolff described Valtteri Bottas' drive in the Hungarian Grand Prix as that of the "perfect wingman" - but it was a role he took way too far after playing it so well for a long time.

The Finn's drive for two-thirds of the race was excellent in protecting team-mate Lewis Hamilton from the faster Ferraris.

But in the closing laps Bottas seemed to lose his head, and he came close to causing what would have been a massive controversy.

Had Bottas damaged Sebastian Vettel's car in his clumsy attempt to regain the place when the German overtook him, the inquest would have been long and hard.

It's worth exploring what happened, how Bottas came so close to taking Vettel out, and what it means for the rest of the season.

The first part of the race

Thou shalt not pass: Bottas kept the Ferraris at bay while allowing team-mate Hamilton to pull away

Bottas joined Hamilton on the front row of the grid at the Hungaroring. Behind in the wet in qualifying by a very respectable 0.26 seconds, he was off Hamilton's pace throughout the race as well.

The Mercedes drivers converted their one-two on the grid into the same positions at the first corner, and when Hamilton built a 3.5-second lead after only five laps, it was clear Bottas was in a defensive race against the Ferraris.

Mercedes were particularly worried about Vettel, the big championship threat, who after qualifying only fourth had dispatched team-mate Kimi Raikkonen on the first lap.

And so Bottas' wingman adventures began…

With Bottas' pace still dropping away in the first stint, and Vettel behind him, Hamilton was allowed to build a buffer to the Ferrari of 8.6 seconds by the time Bottas pitted on lap 15.

With Ferrari seeming to have the faster car in the race, it was a crucial gap to have. It kept Hamilton out of Vettel's reach throughout the pit-stop phase.

Bottas pitted early - too early.

The stop appeared to be in response to Raikkonen stopping the lap before, to stop his fellow Finn getting ahead by running faster laps on fresh tyres before Bottas pitted - the so-called under-cut.

In fact, the intention must have been to stop Vettel getting the jump with the under-cut, because a slow stop meant Raikkonen was too far back to be a threat.

Stopping so early meant Bottas' job for the remainder of the race was always going to be extremely tough, because he now had 55 laps to do on a set of soft tyres - considerably longer than their predicted range.

From there, Bottas was destined to be a sacrificial pawn in the Mercedes victory bid.

The critical second phase of the race

Pitting early meant Bottas should keep track position from Vettel, because in theory with new tyres his pace would be better and he could ensure the Ferrari did not get far enough ahead to be able to pit and rejoin in front of the Mercedes.

But for a long time, the theory wasn't working out, because while Bottas was managing tyres to ensure they lasted, Vettel was stretching his advantage. The result was that for nearly 10 laps Vettel had enough of a gap to pit and re-emerge ahead of Bottas. If he had, Mercedes' gameplan would have been over.

Fortunately for Mercedes, a mix of traffic for Vettel, poor pit-stop timing from Ferrari, a slow stop and some sudden quick pace from Bottas - two fastest laps in a row - meant when Vettel pitted, Bottas managed to keep his second place.

So Bottas' wingman duties resumed…

Once Raikkonen pitted for a second time, Mercedes might have been expected to pit Bottas to cover him off. After all, let's not pretend Ferrari weren't using Raikkonen purely as bait to entice Mercedes into pitting Bottas and paving the way for Vettel.

This ploy worked the first time, but not the second.

Mercedes chose to keep Bottas out for a couple of reasons.

Firstly, because overtaking around the Hungaroring is notoriously hard. So track position is absolutely key, and Bottas had it.

Secondly, because if Mercedes had covered Raikkonen, Vettel would have had free rein to chase Hamilton down for the win. On newer, softer tyres, the Ferrari would surely have been able to apply some pressure on him later in the race.

The build-up to controversy

Bottas and Hamilton have each signed contract extensions at Mercedes in recent weeks

Bottas drove a brilliant race from lap 40 to lap 64. On older tyres, with much less pace, he kept Vettel at bay. This was the exceptional wingman performance Wolff was describing, and it helped Hamilton win the race.

On lap 65, though, Bottas took his wingman duties to a new extreme.

Vettel's attacks were getting more and more persistent and dangerous heading into the closing stages. Bottas' rear tyres were visibly ailing, and when he couldn't get the power down on the exit of Turn One, Vettel finally seized the opportunity to pass.

It's fair to say Vettel arguably could have given Bottas more room on the inside as they headed to Turn Two. Vettel did close the door to take the apex and could have been more cautious, but Bottas never should have tried to recover the position in the manner he did.

Vettel was just about fully ahead, Bottas was coming at the corner from completely on the inside, hugging the grass, and he was never going to be able to make it stick. Bottas was behind Vettel, on older, less grippy tyres, and on the dirty part of the track. Vettel's move was done.

Instead, Bottas kept coming, went partially over the kerb, locked his wheels, and hit Vettel from behind.

I think it was desperation from Bottas - he wasn't fussed about crashing with Vettel at that point and put his car in a position where a crash was almost inevitable.

This comes just weeks after Wolff and Hamilton had accused Ferrari of unfair tactics after two incidents in a three-week period in which a Ferrari had collided with a Mercedes on the first laps of the French and German Grands Prix - accusations they later withdrew.

In my opinion, the Bottas incident in Hungary was the most questionable of the lot.

For F1's sake it was good (and lucky) Vettel managed to continue unscathed - because if he had retired after that hit from Bottas, it could have put a real taint on what has been a breathtaking season so far.

In the end, Vettel finished second and Bottas picked up damage - ultimately his comeuppance - and Vettel was magnanimous afterwards.

If Vettel had retired, I think the inquisition from Ferrari and governing body the FIA would have been a deep one.

The Ricciardo battle

Bottas has been given a 10-second penalty and two penalty points for his clash with Daniel Ricciardo

Bottas' demolition derby was not finished there. Having picked up damage from the Vettel incident, and with his tyres absolutely shot, he had Daniel Ricciardo's Red Bull up behind him and lapping three seconds quicker on newer ultra-soft tyres and a fully intact car.

If Bottas' move on Vettel was desperate, his defence against Ricciardo was plain foolhardy. With a damaged car and worn tyres, he braked as late as Ricciardo at Turn One as the Australian went for a fair move around the outside.

In a normal fight, Ricciardo is known as one of F1's latest brakers. But with Bottas driving a hobbled car, his defence was nonsensical. He was never going to slow down sufficiently.

Inevitably he locked up, couldn't stop the car and drilled into the side of the Red Bull. It was as if he had let his rational thinking go.

Somehow they both recovered and even when Mercedes, acknowledging Bottas was out of order, told him to cede the position to Ricciardo, he refused and fought tooth and nail once more with the Aussie.

All the wheel-to-wheel action showed the mental state Bottas was in during the latter stages of the race.

Out of character for Bottas

After the Bahrain Grand Prix earlier in the year, I questioned Bottas' wheel-to-wheel race-craft, but since then we've seen a much better, more committed Bottas.

In Hungary, he was far too committed, but I think on this occasion it was the frustration of how the race had unfolded that had boiled over and he lost his head in the heat of battle.

It was the most un-Bottas-like few laps, and it continued after the race had finished.

He was asked about Wolff's remarks calling him a wingman, and he said he was hurt by them.

Any driver would feel the same way, hearing that effectively they are reduced to number-two status. And Bottas looked as unhappy as I've seen him after a grand prix, even if later on he said he "understood" and had no problem with it.

A mix of a lack of pace, some bizarre high-profile crashes and probably most of all the team politics had made it a very tough afternoon emotionally.

A reality check for the Finns

The second half of 2018 is likely to see Bottas and Raikkonen thrust ever more into supporting roles

F1's four-week summer break has come at a good time for both team and driver.

Bottas has driven brilliantly on the whole this year and undoubtedly deserved the new Mercedes contract that was announced before the German Grand Prix.

But only one pole position and no wins this season, despite some great drives, will be weighing on his mind, especially given his team-mate's success.

Whether or not team orders have been applied so far this year is a moot point. But, for me, Budapest was finally the moment when both Ferrari and Mercedes clearly placed all their eggs in one basket.

Bottas was a sacrificed wingman for Mercedes, but over in the red corner, Raikkonen was exactly the same for Ferrari, just in a more lower-profile way.

Some people will not like this, but with this season being so close, and with only two drivers left in genuine contention for the championship, it has to be the right thing for the teams to do.

Both Bottas and Raikkonen have had their moments this season, but ultimately the second half of the season is going to be the Hamilton v Vettel show.

And the wingmen will have an increasingly important role.