MADRID (AP)Barcelona needs to switch back into high gear.

The Catalan team got off to a strong start this season but has begun to struggle just before crucial matches against Inter Milan in the Champions League on Wednesday and Real Madrid in the Spanish league on Sunday.

A setback against Inter would hurt the team’s chances of winning another European Cup, likely leading to a second consecutive elimination in the group stage.

A setback against Madrid could drop the team from the Spanish league lead, and deal another big blow to its morale.

”We were flying until three weeks ago, but not anymore,” Barcelona coach Xavi Hernandez said after his team’s hard-fought 1-0 home win over Celta Vigo in the Spanish league on Sunday.

Barcelona also struggled in a 1-0 league win at Mallorca the previous weekend, and last Tuesday it played poorly in a 1-0 loss at Inter to fall into a difficult position to advance from Group C of the Champions League.

Bayern Munich comfortably leads the group after three victories, with Barcelona and Inter battling for the second qualification spot and Viktoria Plzen remaining winless in last place. Barcelona dropped three points behind Inter after last week’s loss, so anything but a home victory on Wednesday will likely mean another Champions League elimination.

The only other time Barcelona failed to advance to the knockout stage in consecutive seasons in the Champions League was in 1997-98 and 1998-99, when squads led by Louis van Gaal first finished behind Dynamo Kyiv and PSV Eindhoven, and then behind eventual finalists Bayern Munich and Manchester United.

Last year, Barcelona endured its worst Champions League campaign in about two decades, finishing behind Bayern Munich and Benfica in its group while going through a dire financial situation in the aftermath of Lionel Messi’s departure to Paris Saint-Germain.

Failure this season would be extra difficult after the club went on a spending spree to boost its squad with players such as Robert Lewandowski and Raphinha.

Barcelona began the season amid high expectations, and after being held to a 0-0 draw at home by Rayo Vallecano in its Spanish league opener, it went on to win seven of its next eight matches in all competitions. The only setback was a 2-0 loss at Bayern Munich in the Champions League. Its other result in the European tournament was a 5-1 rout of Viktoria Plzen at home.

Barcelona had outscored its opponents 23-4 in its first eight matches in all competitions, but found the net only twice in its last three games. Lewandowski scored 11 goals in his first eight matches with the club, but netted only once in the last three games.

After the Inter game, Barcelona travels to the Spanish capital to visit Real Madrid and defend its Spanish league lead. The teams are tied with 22 points, with the Catalan club ahead on goal difference. Madrid is the defending champion both in the Champions League and the Spanish league.

Xavi is expected to be without some key players defensively both against Inter and Madrid, including Ronald Araujo and Jules Kounde.

AP World Cup coverage: and

Tales Azzoni on Twitter: