Real Madrid needed a stoppage-time goal by Éder Militão to salvage a 2-2 home draw against Elche and keep its advantage over Sevilla at the top of the Spanish league on Sunday.

Madrid struggled in what was a disappointing afternoon for its top player this season, Karim Benzema, who missed a penalty kick in the first half and had to be replaced in the second because of an injury.

The draw kept Madrid four points ahead of second-place Sevilla, which also had to rally from two goals down to escape defeat against Celta Vigo and earn a 2-2 draw at home on Saturday.

Madrid has won once in its last three league games, while Sevilla drew two in a row. Third-place Real Betis moved closer by winning at Espanyol on Saturday. Manuel Pellegrini’s team is 10 points from the lead after 22 matches.

Benzema’s struggles began when he missed an opportunity from close range with only the goalkeeper to beat inside the area in the first half. Moments later Benzema, Madrid’s top scorer this season, had his chance to give his team the lead from the penalty spot, but the France striker sent his shot way over the crossbar.

To cap an unusually frustrating day, Benzema had to leave the match in the 58th because of an apparent muscle injury. He grabbed the back of his left leg as he headed for the locker rooms.

Lucas Boyé and Pere Milla scored a goal in each half to give Elche a 2-0 lead, but Madrid pulled closer with Luka Modric’s penalty kick in the 82nd and evened the match with Militão’s firm header off a cross by Vinícius Júnior.

“It’s tough to take,” Milla said. “We had Madrid against the ropes but couldn’t take advantage of it.”

Vinícius, who also missed a few good chances, picked up a yellow card that will see him suspended from the next match.

Madrid had beaten Elche 2-1 in extra time on Thursday to advance to the quarterfinals of the Copa del Rey. Coach Carlo Ancelotti had not used Benzema, goalkeeper Thibaut Courtois and defender Militão in that match. Eden Hazard, who scored the winner in extra time Thursday, returned to the starting lineup Sunday after not having earned many minutes because of a series of injuries. 

Elche moved five points from the relegation zone with the draw at the Santiago Bernabéu Stadium. It had won two straight games in the league.

Hazard thought he had earned a penalty kick early in the second half but the call was overturned after video review.