McLaren's under-fuelling fiasco may have ruined Lewis Hamilton's Spanish Grand Prix but it appears to have strengthened his position within the team.

The McLaren team principal, Martin Whitmarsh, has been impressed by the way Hamilton responded to the devastating punishment of being flung from pole position to the back of the grid after running out of fuel during Saturday's qualifying session; cars must be able to give a sample of one litre.

Hamilton, whose contract is up for renewal at the end of the season, then drove heroically to finish eighth, using only a two-stop strategy, and was as high as fourth at one stage.

Whitmarsh said of Hamilton: "I have to say he had some greatness I had not seen before. By the end of our chat he was consoling me. To say I was disappointed is a modest expression of what I felt.

"He was saying we win and lose as a team. He was a great, great driver this weekend. To be a great driver like Fangio you need greatness in handling setbacks, challenges off the track, and he has excelled in that. My affection and admiration for Lewis have been enhanced by events this weekend."

Last season, with shunts on the track, confrontations with stewards off it, personal difficulties and a flirtation with Red Bull, was Hamilton's most difficult in Formula One. It is fair to say that in that time Jenson Button became the more popular driver at the Woking-based team. But this year, despite being the innocent victim of one setback after another, as McLaren have done their best to rival the Michael Frayn farce Noises Off, Hamilton has been exemplary.

In all five races, from Melbourne to Barcelona, Hamilton has been dogged by ill fortune. And even on Sunday he suffered yet another mishap in the pits which cost him at least two seconds.

Hamilton said: " I am always calm with things like that [a qualifying penalty]. But I am constantly growing, so I would agree I took it better.

"Even though I had issues, I have stayed focused and kept my head down and done the best job I could do despite things going on around me. That's all I can do and that is all I expect – to do my best.

"People always say that I am not very good on my tyres, can't look after them and can't make them last, but I was the only one to do a two-stop, so I think that says enough."

But according to Button the team – like others – are having problems with pace and with coming to terms with the new tyres. He said: "It's funny when you look at the points that teams scored at the weekend. The two top teams scored eight and six, as teams. Then there's Lotus with 27 and Williams with 25.

"It's unbelievable. I don't feel that our pace is good enough to fight with those guys. My fastest lap of he race was 2.6 seconds slower than Romain Grosjean, and he didn't even win the race.

"I think we're struggling in terms of pace and I'm definitely struggling in terms of finding a balance with the car. We haven't had the pace in the last two races. In reality we don't understand the tyres. We still have a good car and I think the next race we could be quick again.

"But we won't understand why we are quick. We might pretend to but we won't understand. And I'm sure Williams don't understand why they just won the race here."

Meanwhile, Whitmarsh has admitted that he should have told Hamilton to abandon his Spanish Grand Prix qualifying lap as soon as the team realised they had not put enough fuel in his car.

"With hindsight I was wrong but I don't think I or very many people anticipated that, as a consequence, we would be starting from the back of the grid," he said.

"With hindsight I could have called it a different way, and he could have just come in at the end of the out lap. But, frankly I did not expect the penalty that he received."