Roger Federer has dispelled talk of retirement after committing to play in his home-town tournament in Basle until 2019.

The 18-time Grand Slam champion signed a new three-year contract with the Swiss Indoors event, which he has won seven times since making his debut in 1998.

Federer’s new deal will take him up to the age of 38 – five years off Jimmy Connors’ record who was still entering ATP events at 43.

The player’s future in the game had been called into question when he returned in January from a six-month lay-off due to injury.

Federer headed into the Australian Open with just one week of professional tennis under his belt, helping take Switerland to the semi-finals of the Hopman Cup in Perth.

But the 35-year-old defied the doubters in spectacular fashion by beating Spain’s Rafael Nadal to claim his 18th Grand Slam title.

Federer was forced to miss the event last year and is looking forward to returning in October.

He said in a statement announcing the news on swisstennis.ch: "I cannot wait to return to my home country in the autumn. Playing in Basle is always a highlight of the year."

In the wake of his Australian Open victory, the now-world No 9 prompted concerns that he would bow out from the game on a high – as Pete Sampras did following his surprise win at the 2002 US Open.

“I hope to see you next year,” said Federer in Melbourne. “If not, this was a wonderful run here and I can’t be more happy to have won tonight.”

Federer’s use of ‘if not’ set alarm bells ringing but as he paraded the trophy at Melbourne’s Royal Exhibition Building the following morning, the Swiss clarified that: “I hope to be back next year, of course.”

“That’s why I took the six months off, to hopefully still be playing for a couple of years.”