Bayern Munich set to sign former Spain midfielder Xabi Alonso from Real Madrid

Real Madrid Xabi Alonso right, duels for the ball with Atletico Madrid's Gabi during a Spanish Super Cup soccer match at the Vicente Calderon stadium in Madrid, Spain, Friday, Aug. 22, 2014. (AP Photo/Daniel Ochoa de Olza) (The Associated Press)

A Bayern Munich official says the Bundesliga champions are set to sign midfielder Xabi Alonso from Real Madrid.

Bayern financial director Jan-Christian Dreesen says Alonso was expected in Munich on Thursday for his medical. Alonso and Bayern have "in principle" agreed on a transfer and the two clubs are "in friendly talks" about a deal expected to be completed within a couple of days.

Alonso won the 2008 and 2012 European Championship and the 2010 World Cup with Spain before retiring from the national team this week.

Alonso would be the fifth Spaniard to play for Bayern, whose coach is another Spaniard, Pep Guardiola. Other Spaniards on the team are Javi Martinez, Thiago Alcantara, Pepe Reina and Juan Bernat.