BARCELONA, Spain — Real Madrid took charge of the Spanish league title race after turning to a little-used defender to grind out a 1-0 win at Valladolid on Sunday.

Valladolid’s defence scrambled to clear a constant barrage of crosses into its box by the visitors until Toni Kroos finally connected with goalscorer Nacho Fernández in the 78th minute.

Zinedine Zidane’s side moved three points ahead of Barcelona - a day after the defending champions lost 2-0 at Valencia.

“We knew it would be another tough game,” Zidane said. “They had only lost once at home. They are a very competitive team and these are three important points."

Besides taking advantage of Barcelona's defeat, Madrid also saw Atlético Madrid stumble yet again and slip further behind.

Atlético was held to a 0-0 draw at home by relegation-threatened Leganés, extending its winless streak to four matches across all competitions.

Getafe moved past Atlético and into fourth place - the final Champions League spot - after edging Real Betis 1-0 at home with a late penalty.

Madrid hosts Atlético next weekend.

NACHO DECIDES

Madrid completely dictated the match while Valladolid, partly owned by former Madrid player Ronaldo, did its best to soak up the attacks.

The only real test for Valladolid goalkeeper Jordi Masip came shortly after halftime when he stretched to parry Rodrygo’s strike. But Madrid increased the pressure and the goal came from one of its least likely threats.

Nacho, a central defender, started at right back in the place of the suspended Dani Carvajal. He had only made six previous appearances this season.

But Nacho showed the finishing touch of a striker - or teammate Sergio Ramos - when he jumped over his marker and sliced a perfect header just inside the far post and well beyond the reach of Masip.

He ran to Zidane and embraced him after his first goal of the season.

“I wasn’t going to join the attack (on the corner kick) and instead hang back, but Zidane told me to go to the near post. And luck would have it that it worked out,” Nacho said. “The confidence of my coach is the most important thing for me. All of us are with our coach through the good times and the bad, and I believe that is the secret to the success we have had for all these years."

GOOD DAY

Getafe substitute Ángel Rodríguez got the winner against Betis from the penalty spot in the 89th after Álex Moreno had handled the ball in the area.

Getafe, a modest club from Madrid, came close to earning a Champions League berth last season, finishing fifth.

“We are competing against teams with ambitious objectives and to have the points we do is fantastic,” said Getafe coach José Bordalás.

BAD DAY

Atlético's frustrating draw with Leganés added to the run of poor results by Diego Simeone’s team.

Atlético never seriously threatened its crosstown rival at its Wanda Metropolitano Stadium in a match it needed to win to reclaim third place from Sevilla. Now it must worry more about qualifying for the Champions League than challenging for the title.

For many Atlético supporters, this is the worst the team has played since Simeone transformed it into a title winner on arrival in 2013.

“When the results are not coming, it is normal that our fans get angry, and that makes us take responsibility for the situation. We have to take action,” Simeone said. “I can’t say anything to our fans. We have to show them with our deeds and not with our words. Words are carried away by the wind.”

Leganés ended the match with 10 men after goalkeeper Iván Cuéllar was sent off with about a minute to play in stoppage time with a second yellow card that the referee said was due to his attempt to “simulate aggression by a ballboy.” Televised images showed Cuéllar tumbling backward when a ballboy had seemed to push him with one hand on the chest while the keeper was getting the ball from him.

The visitors finished with defender Jonathan Silva in goal because his side had made all three substitutions. He did not have to make a save.

OTHER RESULTS

Sixth-place Real Sociedad saw goals from Aleksander Isak and Cristian “Portu” Portugués - plus an own-goal from Francisco Gámez - to beat Mallorca 3-0 at home.

Celta Vigo drew 0-0 with Eibar and remained in the drop zone just ahead of Leganés.

___

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