​Schalke 04 ace Leon Goretzka will join ​Bundesliga giants ​Bayern Munich when his contract expires next summer.

That is according to German source Bild, who report that the 22-year-old has agreed to join the Bavarian side on a free transfer, and will complete the move in the summer, after which he will wear the Bayern jersey.

​Premier League sides ​Arsenal and Liverpool were both believed to be on the player's trail. And reports of the Reds agreeing a deal with him emerged on Saturday.

The Anfield side only recently completed the capture of Dutch defender Virgil van Dijk, and were said to have sewed up a deal for Goretzka, who would have been the second player to join ​Liverpool from Schalke on a free transfer in recent times, with Joel Matip having signed in 2016.

Arsenal, meanwhile, expect to be without Alexis Sanchez by the time next season rolls around, and had eyed Goretzka as a choice player to come in and provide a boost. Mesut Ozil could exit the Emirates as well, leaving the Gunners desiring replacements.

The English outfits appear to have lost out in the chase, however. Goretzka is likely to be playing his football for Bayern next season, leaving a host of European clubs ruing what could have been quite the steal.

The January window, though, could provide some respite for both clubs, more so Arsenal, as Liverpool are very well stacked in attack, with the likes of Sadio Mane, Mohamed Salah, Roberto Firmino, Philippe Coutinho and Adam Lallana all in their ranks for the time being.