Schalke confirm Bayern Munich to sign Germany midfielder Leon Goretzka

Bayern Munich have agreed a deal to sign Schalke midfielder Leon Goretzka in July, with the player completing a medical on Thursday.

Goretzka's deal at Schalke was due to expire in the summer and Bayern have won the race to sign the 22-year-old Germany international despite interest from Real Madrid, Barcelona, Manchester United and Liverpool.

Schalke CEO Christian Heidel told a news conference: "Leon Goretzka informed us early this week that he wants to leave Schalke for Bayern. We noted it with regret.

"Yesterday, Karl-Heinz Rummenigge informed us that Leon had his medical. We will lose a very, very good player.

"He has signed a contract at Bayern from July 1, 2018. We did all we could to keep him at Schalke. We can handle the situation. It did not come out of the blue. We were prepared."

Coach Domenico Tedesco added: "We are sad and disappointed to lose Leon as a player and character, but we have to accept the decision.

"We hope the fans won't show a negative reaction on Sunday. Our fans have always supported our team, and Leon will be part of it in the second half of the season.

"He is a professional and will give it his all for Schalke. He remains an important team member."

Bayern later confirmed the deal, with Rummenigge telling their official website: "We are very happy that with Leon Goretzka, a German international with great perspective has opted, despite considerable competition from abroad, for FC Bayern. This ensures that Leon Goretzka will remain in the Bundesliga."

Coach Jupp Heynckes told a news conference ahead of Sunday's game against Werder Bremen: "It's great for the Bundesliga and Bayern that a Germany international in Leon Goretzka has decided to sign despite offers from Spain, England and Italy.

"I have spoken a lot with Peter Hermann [his assistant], who worked with him at Schalke.

"Leon has great character, he's an intelligent lad and is very performance-orientated. He's impressed me playing in the Bundesliga and also with Germany at the Confederations Cup.

"Leon is a very young player and continues the rebuilding process at Bayern with younger players.

"New, younger players will provide a fresh impetus and I think that's very positive."

Goretzka, who helped Schalke to third place in the Bundesliga, has been linked with Bayern since helping World Cup holders Germany win the Confederations Cup in Russia last summer.

Sport Bild had claimed as early as May that he had already agreed to join the Bundesliga champions -- a report immediately denied by the midfielder on his Facebook page.

ESPN FC's Bayern Munich correspondent Mark Lovell contributed to this report.