Danilo Petrucci began the French MotoGP weekend last on the timesheets in Friday practice, but pulled out some of his renowned wet weather magic to equal KTM's best finish of the season with fifth in the flag-to-flag race.

Last year's wet Le Mans winner for Ducati, who began this year's race from just 17th, thought his first 'orange' podium was a real possibility as he climbed rapidly up the order.

But as the track dried out Petrucci's progress slowed and he eventually finished five-seconds behind Ducati's Francesco Bagnaia, but two-seconds clear of LCR Honda's Alex Marquez.

"In a moment during the race I thought ‘maybe I will be on the podium also this year!’" Petrucci said. "But unfortunately it was a very difficult race in tricky conditions.

"We have to improve our qualifying position because we started so far back and there was a lot of mess in the beginning but then I was able to recover some positions when it started to rain.

"I took a lot of risk. Unfortunately, there was a small problem putting first gear when I was swapping the bikes and I lost some positions."

Petrucci was one of the few riders to emerge with medium wet tyres front and rear. It would prove the more competitive option later in the race, but made for some scary early laps after his bike swap.

"In the next three laps the medium front and rear were like riding on ice!" he said. "I did another small mistake running wide at Turn 8 but then I stayed calm and managed to recover a lot of positions with the medium rear and front.

"I thought I could finish on the podium, but anyway it is a good result for us and to be the first KTM in a race.

"On one hand I am really, really happy for the team because we are getting through very difficult times. Friday afternoon we finished in last position and this morning I was first in the rain.

"For sure if it was raining all the race then it would be better for me but I’m happy for the result…while I was also looking at the podium. Anyway we will try next time. We are still building our best bike."

Petrucci's size means that he needs his RC16 modified for a bigger wheelbase, to avoid excessive weight transfer, but its creates issues in other areas and is still a work in progress.

"Since I first jumped on this bike I have noticed something different and I tried to solve it in many different ways," he said.

"The fact is that I have weigh quite a lot more than other riders so the weight transfer is much more and I need a bigger wheelbase to reduce this but for sure you lose in another way and in another part of the circuit.

"Still I can say that at the moment we are quite clear about the problem, especially in the last part of the braking and entry to the corners.

"We don’t have a solution at the moment to solve it. But in the wet everything is more calm and soft and my weight is not a problem.

"At least I can have a bit more traction and the disadvantage is less, maybe I can even have an advantage. I really like to ride in the rain and I really enjoyed being on top this morning.

"For sure we have to upgrade the stability and the power because now even the aerodynamics are not perfect and maybe as you saw today Bagnaia passed me on the main straight. It is the easiest way to gain time on the straight because you don’t risk anything."

Team manager Herve Poncharal said: “I want to congratulate Danilo of course for his never give up attitude. We told him on the grid to be ready for the flag to flag and stay focused and this is what he did. It's another great result here in Le Mans for Danilo.”

Backing up Petrucci's performance was Tech3 team-mate Iker Lecuona, who finished as the next best KTM rider, in ninth, despite a fall.

"What we didn’t notice, as it was not shown on TV, is that Iker crashed on his out-lap on rain tyres, but managed to pick up the bike and come back from the bottom of the field to ninth position, passing both, Valentino Rossi and Maverick Viñales in the last lap, which is quite an achievement," Poncharal said "Great job, great fighting spirit shown by Iker also.”

Factory KTM rider Brad Binder finished 13th with team-mate Miguel Oliveira crashing out.