Lewis Hamilton says his fifth-placed finish at the Spanish Grand Prix felt "better than a win" after he recovered from a first-lap puncture that left him in 19th position.

Starting from P6, Hamilton suffered the puncture following contact from Haas driver Kevin Magnussen on the first lap in Barcelona and suggested to his Mercedes team he should retire from the race to preserve the car's engine after rejoining at the back of the field.

But the seven-time champion produced an excellent drive after his enforced pit-stop and looked on course to finish fourth before a coolant leak allowed Ferrari's Carlos Sainz to edge him out late on.

Speaking after the race, Hamilton considered the circumstances he was forced to overcome en route to a strong points finish.

"To have that problem and come back, it felt like some of the older races I've done," Hamilton said. "It feels amazing.

"I was thinking it was impossible to get back into points, but the team said 'no, you're on for eighth'. I thought they were being super-optimistic.

"I'm glad we didn't [retire] and it just shows you never stop and never give up, and that's what I did.

"A race like that is like a win, and it actually feels better than a win when you have come from so far back."

Since losing out on a record eighth world title in the closing seconds of the final race of the 2021 campaign, when Max Verstappen clinched his first championship in controversial circumstances, Hamilton has endured a frustrating time.

The 37-year-old, who has only secured one podium this campaign, has been critical of Mercedes' W13 car on numerous occasions this year, calling it "undriveable" after finishing 13th at the Emilia Romagna Grand Prix last month. 

But Hamilton believes the team's work on the car has improved it greatly, and he suggested he could have joined team-mate George Russell – in third – in challenging the two Red Bull drivers, who secured their second one-two in three races, if not for his early problems.

"We have made a lot of improvements with the car and the race pace is much better, the car is much nicer in the race," he added. "We have some improvements to make in qualifying.

"If I hadn't had that [issue], I would have been fighting with the Red Bulls."