In the 2006–07 season, Hargreaves broke his leg, which kept him out of most of Bayern's league campaign that season. He recovered in time to take part in Bayern's victory over Real Madrid in the Champions League, progressing after an aggregate score of 4–4 thanks to their two away goals in the 3–2 defeat in the first leg at Madrid's Estadio Santiago Bernabéu. However, Bayern were knocked out in the quarter-final by Milan and finished fourth in the Bundesliga, missing out on Champions League football for the first time since 1996. In total he played 145 top-flight matches in Germany for FC Bayern.