Real Madrid beat Barcelona 2-0 in the “clásico” at the Santiago Bernabéu on Sunday to end its seven-match winless streak against its rival and return to the top of the Spanish league.

Vinícius Júnior scored in the 71st minute and substitute Mariano Díaz sealed the victory in stoppage time to give Madrid a one-point lead over Barcelona and halt the team’s recent struggles.

More Images
Real Madrid's goalkeeper Thibaut Courtois, right, tries to block a shot of Barcelona's Arthur, center, during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Real Madrid beat Barcelona 2-0 in the “clásico” at the Santiago Bernabéu on Sunday to end its seven-match winless streak against its rival and return to the top of the Spanish league.

Barcelona's Lionel Messi, center, competes for the ball with Real Madrid's Toni Kroos, right, and Vinicius Junior during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Madrid had lost its last four league games at the Bernabéu against Barcelona, and its last win over the rival in any competition had come back in 2017 in the Spanish Super Cup.

Barcelona's Nelson Semedo and Real Madrid's Sergio Ramos, right, compete for the ball during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Lionel Messi had a quiet night, squandering a couple of good chances on one-on-one situations and being shown a late yellow card for a hard foul from behind on Madrid midfielder Casemiro.

Barcelona's Lionel Messi attends the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Atlético Madrid's struggles away from home continued with a 1-1 draw at last-place Espanyol, its fourth consecutive winless match as a visitor in the league.

Real Madrid's Isco, right, is challenged by Barcelona's Arturo Vidal, center, and Nelson Semedo during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoAndrea Comas)

“It's been tough for us away from home,” Atlético forward Saúl Ñíguez said. “We have been doing well at home, but we have to find a way to improve in these away matches."

Barcelona's Lionel Messi reacts during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

GETAFE REBOUNDS

Real Madrid's Vinicius Junior gestures during during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

SEVILLA WINS LATE

Zinedine Zidane’s Madrid was winless in three straight games in all competitions, and also hadn’t won at home in three consecutive games.

Real Madrid's goalkeeper Thibaut Courtois, right, tries to block a shot of Barcelona's Arthur, center, during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Real Madrid's goalkeeper Thibaut Courtois, right, tries to block a shot of Barcelona's Arthur, center, during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Madrid had lost its last four league games at the Bernabéu against Barcelona, and its last win over the rival in any competition had come back in 2017 in the Spanish Super Cup.

Barcelona looked the most dangerous in the first half but Madrid took control after halftime, opening the scoring after Vinícius Júnior found the far corner with a shot from inside the area after a run into the area following a through-ball by Toni Kroos. The ball deflected on Gerard Piqué's leg before getting past Barcelona goalkeeper Marc-André ter Stegen.

Díaz added the second from inside the area near the end.

Barcelona's Lionel Messi, center, competes for the ball with Real Madrid's Toni Kroos, right, and Vinicius Junior during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Barcelona's Lionel Messi, center, competes for the ball with Real Madrid's Toni Kroos, right, and Vinicius Junior during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Lionel Messi had a quiet night, squandering a couple of good chances on one-on-one situations and being shown a late yellow card for a hard foul from behind on Madrid midfielder Casemiro.

Former Real Madrid forward Cristiano Ronaldo was among the nearly 80,000 in attendance at the Bernabéu, as were players from the Wuhan Zall soccer team based in the Chinese city of Wuhan, the epicenter of the virus coronavirus outbreak. The team arrived in Spain in January for preseason training but still doesn't know when it will be able to return home.

ATLÉTICO HELD AGAIN

Barcelona's Nelson Semedo and Real Madrid's Sergio Ramos, right, compete for the ball during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Barcelona's Nelson Semedo and Real Madrid's Sergio Ramos, right, compete for the ball during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Atlético Madrid's struggles away from home continued with a 1-1 draw at last-place Espanyol, its fourth consecutive winless match as a visitor in the league.

The result dropped Diego Simeone's team to fifth place, outside the Champions League qualification spots. It is one point behind fourth-place Getafe and two behind third-place Sevilla.

Atlético has won only one of its last 10 away matches in the league, with seven draws and two losses. The sole win during that run was against Real Betis in December. It has only two other away wins in the league this season.

Barcelona's Lionel Messi attends the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Barcelona's Lionel Messi attends the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

“It's been tough for us away from home,” Atlético forward Saúl Ñíguez said. “We have been doing well at home, but we have to find a way to improve in these away matches."

Espanyol, at the bottom of the table with 20 points from 26 matches, opened the scoring with an own-goal by Atlético defender Stefan Savic in the 24th. He found his own net while trying to intercept a low cross by Chinese forward Wu Lei.

Ñíguez equalized for Atlético with a neat volley from outside the area after the ball was cleared from the box shortly after halftime.

Real Madrid's Isco, right, is challenged by Barcelona's Arturo Vidal, center, and Nelson Semedo during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoAndrea Comas)

Real Madrid's Isco, right, is challenged by Barcelona's Arturo Vidal, center, and Nelson Semedo during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoAndrea Comas)

GETAFE REBOUNDS

Getafe ended its two-game losing streak in the league with a 1-0 victory at relegation-threatened Mallorca with a goal by Nemanja Maksimovic in the 67th.

The win moved the team from southern Madrid back into the Champions League places after losses to Sevilla at home and Barcelona away.

Barcelona's Lionel Messi reacts during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Barcelona's Lionel Messi reacts during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

SEVILLA WINS LATE

Forward Youssef En-Nesyri scored the winning goal three minutes into stoppage time to give Sevilla a 3-2 home win over 10-man Osasuna.

En-Nesyri had already scored Sevilla's first goal, and Lucas Ocampos added to the team's first-half lead before the break. Osasuna went a man down in the 54th after goalkeeper Sergio Herrera was sent off for touching the ball with his hands outside the area, but the visitors rallied with goals by Aridane Hernández in the 64th and Roberto Torres in the 74th.

Real Madrid's Vinicius Junior gestures during during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Real Madrid's Vinicius Junior gestures during during the Spanish La Liga soccer match between Real Madrid and Barcelona at the Santiago Bernabeu stadium in Madrid, Spain, Sunday, March 1, 2020. (AP PhotoManu Fernandez)

Osasuna stayed in 12th place.

ATHLETIC ENDS SLUMP

Athletic Bilbao beat Villarreal 1-0 at home to end a 10-match winless streak in the Spanish league.

Athletic was yet to win in the league this year, with its last victory coming on Dec. 1 against Granada, its opponent in the Copa del Rey semifinals on Thursday.

Raúl García scored the winner by converting a 56th-minute penalty kick.

The game ended with 12 yellow cards, six for each team, and Villarreal coach Javi Calleja was sent off.

Athletic, coming off four straight league losses, moved to 10th place, four points behind eighth-place Villarreal.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

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