MADRID (AP)Barcelona keeps on winning – at least in the Spanish league.

The Catalan club edged Celta Viga 1-0 on Sunday for its seventh straight victory in the competition, regaining first place and restoring some confidence going into a decisive Champions League game against Inter Milan.

Barcelona has not been able to repeat its league success in the group stage of the European competition, and anything but a home victory against Inter on Wednesday will leave the club on the brink of elimination for a second consecutive season after the departure of Lionel Messi.

Barcelona lost to Inter last week in Italy for its second consecutive Champions League defeat.

In the Spanish league, though, Barcelona has been perfect since a scoreless opening draw against Rayo Vallecano at home.

Pedri Gonzalez scored the winner on Sunday in the 17th minute with an easy shot into the open net after Celta defender Unai Nunez couldn’t fully clear a low cross by Gavi Paez.

Celta, which had won three of its last five league games, played well in the second half but failed to capitalize on its scoring chances at the Camp Nou.

”The way we played, not even a draw would have been a fair result,” Celta striker Iago Aspas said. ”We created five or six chances in the second half.”

The visitors had a goal disallowed for offside in the 70th and Barcelona needed a good performance from goalkeeper Marc-Andre ter Stegen.

”We suffered a bit more than we should have,” Barcelona defender Marcos Alonso said. ”But what is important is that in the end we got the three points.”

Barcelona coach Xavi Hernandez said the team should have closed out the match before halftime.

”We struggled too much in the second half,” Xavi said. ”They had some clear chances to score in the end. It was an important victory, but there is a lot to improve.”

Barcelona striker Robert Lewandowski, the league’s leading scorer with nine goals, had his streak of scoring in the last six rounds come to an end.

The result sets up a showdown between Barcelona and Real Madrid at the Santiago Bernabeu Stadium next Sunday in the first clasico of the season.

The rivals have the same 22 points after eight matches, but Barcelona is ahead on goal difference.

Hernandez was without several defenders because of injuries and had to improvise a defensive lineup starting with three left backs – Alejandro Balde played as a right back and Marcos Alonso as a center back, with Jordi Alba in his usual position.

Ousmane Dembele and Ansu Fati began the match on the bench, with Raphinha and Ferran Torres earning their chances from the start.

Barcelona, which hasn’t conceded in its last six league games, earned its second straight win against Celta. It was coming off another 1-0 win – at Mallorca.

The Vigo club sits in 11th place with 10 points from eight matches.

BETIS HOLDS ON

Real Betis held on to a 0-0 draw at Valladolid despite playing more than an hour with a man down as defender German Pezzella was sent off in the 35th.

Betis had defender Luiz Felipe red carded in the 20th minute of its previous league game, a 1-0 loss at Celta.

Sunday’s result dropped Manuel Pellegrini’s team to fifth place with 16 points from eight matches.

Valladolid, coming off its second win of the season, was in 13th place.

ESPANYOL HELD AGAIN

Joselu scored twice in the second half but Espanyol was held by 19th-place Cadiz to a 2-2 draw, extending its winless streak to four matches.

The result left the Barcelona club just outside the relegation zone.

Cadiz is unbeaten in three games after losing its first five.

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP-Sports

Tales Azzoni on Twitter: http://twitter.com/tazzoni