Singapore: Lewis Hamilton's title challenge stuttered on the streets of Singapore when he was forced to retire while leading Sunday's Formula One grand prix but the Briton vowed to keep fighting until the end.

Hamilton, who had won two of the previous three races to put the pressure on championship leader Fernando Alonso, started on pole and was maintaining a two-second gap ahead of Sebastian Vettel when his McLaren encountered gearbox issues on lap 23.

Hamilton nursed the car into a run-off area as Vettel's Red Bull roared into the lead, which the world champion kept all the way to the chequered flag.

With Ferrari's Alonso finishing third, Hamilton now trails the leader by 52 points with six races remaining.

Hamilton cut a forlorn figure as he walked away from the stationary McLaren, deep in thought with his hands clasped behind his back.

The McLaren driver, whose contract situation has been the subject of much debate in recent weeks, was surprised that his car had experienced such a serious problem and could not reach the finish line.

"I had some problems with the gear shift maybe three or four laps before," he told reporters. "I reported that, and they (his team) said it should be no problem. Then I lost third gear and then I did another lap or so, and then I lost all the gears."

The galling thing was that he had been in total control of the race, the 27-year-old said.

"It was quite an easy race for me, I had very good pace," said Hamilton. "It wasn't necessary at that time to have a big gap because Sebastian had worse tyre degradation than me.

"I just had to keep a nice enough gap to stay ahead of him. I was just slowing down to look after the tyres and then I lost the gears."

Hamilton said his chase of Alonso in the standings was not helped by his fourth 'Did Not Finish' (DNF) of the season.

"I just have to look forward to the next races that I have. It's getting harder and harder (to catch Alonso), more and more DNFs, but I won't give up."

Asked if he felt he could realistically make up the 52-point gap, Hamilton took a swig of an energy drink, then responded: "How many?"

When the reporter confirmed the figure, Hamilton took a second to calculate how the remaining six races of the season would have to pan out for him to win a second world championship.

"Oh crap," he said. "Well, it is what it is. I won't give up."

Hamilton is now fourth in the championship standings, two spots ahead of team mate Jenson Button, who finished second in Sunday's race.