Robert Lewandowski has agreed upon an extension with Bayern Munich through 2021.

Lewandowski joined Bayern in 2014 from Bundesliga rivals Borussia Dortmund and was the league’s top scorer in the 2015-16 season.

“I am very happy that the negotiations were successful and came to a positive result,” Lewandowski said. “That means I will stay at Bayern for a few more years. Together we have set great goals.“

“I am happy that we managed to tie one of the best centre forwards in the world to the club for the long-term,” Bayern CEO Karl-Heinz Rummenigge said. “We have now guaranteed that another key player will continue to wear the Bayern shirt for the coming years.”

Lewandowski has been linked to a transfer to Real Madrid in the past.