Updated

Barcelona midfielder Thiago Alcantara has decided to join Bayern Munich after the two sides agreed to a fee of $32 million for the player, who will join the German outfit on a four-year contract.

The 22-year-old was strongly linked with a move to Manchester United, but he will instead join up with former manager Pep Guardiola in Munich after the boss took charge of Bayern from Jupp Heynckes in June.

Thiago played a starring role for Spain in helping them capture the Under-21 European Championship this summer, and he appeared in 27 games for Barca this past season, scoring two goals and adding five assists.

The young Spaniard becomes the third new addition at Bayern this summer, joining Mario Gotze and Jan Kirchoff.

"Thiago Alcantara was the great desire of our new coach Pep Guardiola," said Bayern chairman Karl-Heinz Rummenigge.

"We are delighted that we pulled off this big transfer. Thiago has only just been selected as the best player of the UEFA U21 European Championship. He is a fantastic player with great perspective, which will strengthen Bayern."