File picture: Eric Gay / AP Photo.

Mexico City - Lewis Hamilton is hoping McLaren can rejoin the Formula One front-runners next season, after years in the doldrums, so he can have more battles with former team-mate Fernando Alonso.

The Mercedes driver, who became a four-times world champion at Sunday's Mexican Grand Prix, partnered the Spaniard during a tumultuous 2007 campaign that saw the more experienced Alonso leave at the end of the year.

The rookie and double world champion finished level on points, and one behind Ferrari's title winner Kimi Raikkonen.

While Hamilton has now won 62 races, Alonso's last victory was in 2013 with Ferrari.

He has endured three difficult years at former champions McLaren, whose Honda engines have been beset with problems and are down on power compared to rivals.

The team is currently last but one in the constructors' championship and is switching to Renault power next year. Red Bull has won three races this season with the French manufacturer.

"Just wait until this guy (Alonso) gets a good engine," Hamilton told reporters after enjoying a thrilling battle for ninth place with the determined Spaniard after fighting back from last.

"I really hope for McLaren, which has a special place in my heart, that next year is a better year for them.

"I hope they have a stronger engine and a stronger car. Fernando's a tough cookie and I enjoyed the little battle that I had with him and I hope that we get to have many more like that," said Hamilton.

The Briton said last week that Alonso was the best driver he had raced against as a team-mate.

Alonso won his two titles with Renault in 2005 and 2006, when Hamilton was still rising through the junior series, and is still rated as one of the top drivers on the grid.

McLaren has not won a race since Hamilton left the team for Mercedes at the end of 2012.

Hamilton's main battle this season was with Ferrari's Sebastian Vettel, an external challenge that he said was more satisfying than the recent ones against now-retired team-mate and 2016 champion Nico Rosberg.

"Fighting the other teams is what we want to see, what Formula One wants to see. I remember growing up watching Formula One and that's what I wanted to see," he said.