FILE - Schalke's Alexander Nubel and Benjamin Stambouli. Photo: Leon Kuegeler/Reuters

MUNICH – Bayern Munich have agreed to sign Schalke keeper Alexander Nubel on a five-year contract from next season, the Bundesliga champions said on Saturday.

The 23-year-old keeper will officially join Bayern on July 1 on a free transfer.

"The club and Nubel have agreed the terms of a transfer in the last few days," Bayern said in a statement.

Nubel is seen as a longer-term successor to captain Manuel Neuer, whose current contract runs until the end of next season, with talks of an extension until 2023.

Neuer also joined Bayern from Schalke, arriving at the record German champions in 2011.

Schalke were unwilling to lose Nubel, an Under-21 Germany international, who was made club captain this season by coach David Wagner.

"We made it clear to Alex that he would have had a key role in the future: as goalkeeper and captain leading a team with many young players which has won a lot of fans during the first half of the season," sports director Jochen Schneider said two weeks ago.

Nubel also joins a number of key players who have left Schalke on free transfers, including Leon Goretzka, who also went to Bayern, Max Meyer (Crystal Palace) and Joel Matip (Liverpool).

The keeper is currently serving a four-game ban for a kung-fu-style kick on Eintracht Frankfurt's Mijat Gacinovic, and as a result will miss Schalke's visit to Bayern in the league on January 25.

Bayern meanwhile left with a 26-man squad on Saturday for a week-long training camp in Doha, Qatar.