Bayern Munich have confirmed the signing of striker Robert Lewandowski on a five-year deal that will see the Polish striker play for Dortmund for the remainder of the season before moving to Bayern Munich in the summer on a free transfer.

The Polish striker traveled today from Warsaw to Munich to undergo a medical. Lewandowski passed the medical, and the star striker then signed a five-year deal pre-contract through 2019.

Lewandowski will join Bayern on July 1.

“We’re very pleased about completing this transfer,” said FC Bayern Munich AG chairman Karl-Heinz Rummenigge. “Robert Lewandowski is one of the best strikers in the world. He will strengthen the Bayern squad and give us another boost. We’re delighted both parties have today signed a five-year contract until 2019.”

Lewandowski wanted to move to Bayern last summer, but Dortmund reportedly refused offers for the player to leave and increased his wages instead. Now BVB have lost their star striker on a free transfer to the club that is already a powerhouse in Germany.

Editor’s note: For the latest German soccer news, analysis and opinion, read the Bundesliga section.