Bayern Munich have completed the signing of Barcelona midfielder Thiago Alcantara with a transfer fee of around €25 million.

Bayern Munich have completed the signing of Barcelona midfielder Thiago Alcantara with a transfer fee of around €25 million. Bayern manager Pep Guardiola has turned the player's interest away from Manchester United who were keen to bring him in as midfield reinforcement.

"FC Barcelona and FC Bayern Munich have reached an agreement over the transfer of the player Thiago Alcantara to the German club for a total of €25 million," a statement on Bayern's official website read.

"This agreement also includes holding a friendly match between the two teams, which will be played in the next four years," it added.

Guardiola's influence in this deal cannot be underplayed. During his time at Barcelona, Thiago was given his first-team debut by Guardiola in 2009. With his development as a player hanging in the balance, Thiago seems to have opted for the coach whom he knows, despite there being greater competition in center midfield at Bayern.

The only formality left is the medical examination which Thiago will undertake in the coming days. Upon successful completion of the examination, the player will sign a four-year contract lasting till June 2017.

"Thiago Alcantara was the biggest wish of our new coach Pep Guardiola. We are pleased that we have succeeded in this great transfer," said Bayern's chairman Karl-Heinz Rummenigge.

"Thiago has only just been named the best player at the European Under-21 Championship," he added. "He is a fantastic player with great perspective, which will strengthen Bayern."

Captaining the Spain Under-21 side at the European Under-21 Championships in Israel last month, Thiago was voted in the team of the tournament. He also scored a memorable hat-trick in the final against Italy, which Spain eventually won 4-2. He finished second to teammate Alvaro Morata in the tournament top-scorers.