Philipp Lahm has signed an extension with Bayern Munich through the 2018 season.

Lahm is 30 and has played a key role in Pep Guardiola's first season at Bayern.

Lahm has played for Bayern since 2002, although he made his Bundesliga breakthrough during a two-year loan spell with Stuttgart, and he said he wants to end his career at the Allianz Arena.

"Both the club and my management decided to enter talks at the same time, because it felt right for both sides to prolong the contract," Lahm said. "It's definitely my last contract -- I will retire here at FC Bayern. That has always been my wish. I am absolutely delighted."

Lahm was recently named the 22nd best player in the World Cup by ESPN.