Munich: Bayern Munich captain Philipp Lahm announced Tuesday that he is retiring at the end of the season, one year before his contract with the club ends in 2018.

"My leadership style is always to give everything every day, every training session, every game. I believe I can still do that to the end of the season but not thereafter. That's why it's clear to me that I'll stop at the end of the season," the 33-year-old Lahm told reporters after Bayern's 1-0 win over Wolfsburg in the German Cup.

"I've been considering it for more than the past year, that you have to keep testing yourself, you have to keep asking yourself 'how is it', day by day, week by week on the training pitch, what's the feeling you have," Lahm said. "I'm certain I can deliver my top level — also as a leader for the young players — to the end of the season. It's just a few more months, but no more."

Lahm had been in talks to take over the position of sporting director, vacant since Matthias Sammer stepped down for health reasons last July, but he indicated he will not be fulfilling the role in the short term.

"There were talks and after the talks I came to the decision that now is not the right time to get on board at Bayern," Lahm said.

He had been the preferred candidate of Bayern chairman Karl-Heinz Rummenigge and president Uli Hoeness.

Hoeness said the club had not been in contact with any other candidates for the position of sporting director and held out the possibility that Lahm could yet be convinced to take the role.

"We have all the time in the world. We'll talk to him in the next few days," Hoeness said.

Lahm, who retired from international football after leading Germany as captain to the World Cup title in 2014, played in his 501st competitive game for Bayern on Tuesday. He won the Bundesliga seven times and German Cup six times with the club, as well as the Champions League in 2013 and other titles.

Lahm has been a fixture at Bayern since returning in November 2005 from a serious knee injury after a loan spell at Stuttgart, going on to make 320 Bundesliga appearances (12 goals, 45 assists).

Lahm has almost as many titles as his 24 yellow cards — a remarkably low figure for a defender. Including the World Cup with Germany, Lahm has won 21 titles so far.