Xabi Alonso undergoes surgery on groin injury
The 31-year-old was left out of the world champions' squad for the Confederations Cup later this month, having struggled during the latter half of the season with his club.
Alonso had the surgery with a specialist in Munich.
Spanish media reported he would be out of action for three to four months. The club gave no estimate of how long he would be sidelined.