MADRID (AP) - Cristiano Ronaldo converted a first-half penalty to lead Real Madrid to a 3-1 win at last-place Levante in the Spanish league on Wednesday, keeping his team third in the standings.

Ronaldo scored from the spot in the 34th minute for his 23rd league goal of the season. An own goal by Levante goalkeeper Diego Marino added to the lead in the 38th and Francisco “Isco” Alarcon sealed the victory in second-half injury time.

Brazilian striker Deyverson scored Levante’s goal in the 39th.

The victory helped Madrid rebound from a disappointing home loss to rival Atletico Madrid, a result that virtually ended the team’s title hopes.

It has 57 points with 11 games to go, four points behind second-place Atletico, which defeated Real Sociedad 3-0 at home on Tuesday, and nine less than leader Barcelona, which plays at Rayo Vallecano on Thursday.

Real Madrid opened four points ahead of fourth-place Villarreal, which was held to a 0-0 draw at sixth-place Celta Vigo. Madrid is looking to at least secure third in the standings, which guarantees an automatic spot in the Champions League next season without having to play in the qualifying round.

It was Madrid’s first victory in three games, and the sixth since coach Zinedine Zidane took over the squad nine rounds ago.

Missing several regular starters - including Gareth Bale, Karim Benzema, Sergio Ramos and Marcelo - Madrid struggled to impose its game. It controlled possession at the Ciutat de Valencia Stadium, but the hosts had chances to earn at least a draw.

Ronaldo missed a penalty against Malaga two rounds ago, but struck the net with a firm low shot on Wednesday after youngster Lucas Vazquez was fouled inside the area.

It was the eighth goal in seven matches for Ronaldo, who sparked a controversy after the loss to Atletico by saying that Madrid could be in first place if everyone else in the squad was at his level.

“This is in the past, we talked about it and we are all on the same boat,” Madrid defender Pepe said. “We have to keep working hard to honor this jersey.”

Ronaldo almost nearly had a second goal in the 66th minute, but his close-range shot struck the post.

Teenage striker Borja Mayoral, another member of Madrid’s youth squads, played a key part in helping Madrid increase the lead with a shot from the edge of the area in the 38th. The ball hit the post and bounced off goalkeeper Marino, who ended up pushing it across the line as he tried to grab it.

“The team fought hard,” Pepe said. “This is what our fans want, they want us to give all we have. In some other games we relaxed a bit.”

Levante pulled one closer with Deyverson’s easy goal from inside the area after Madrid’s defense failed to clear a long ball sent into the box. Madrid players complained of a foul on midfielder Casemiro before the ball got to Deyverson.

Levante has 20 points, six less than Getafe, the first team outside relegation zone.

“We created good chances, but it was difficult after the penalty and the unlucky goal we conceded,” Marino said. “There’s still time, but we have to start winning points right away.”

In Vigo, Villarreal missed a chance to keep pace with Madrid by drawing 0-0 with Celta. The result extended Villarreal’s 14-game unbeaten streak in the league.

Sevilla moved past Celta into fifth-place by beating Eibar 1-0 at home, while striker Aritz Aduriz scored a hat trick in Athletic’s 4-1 win over Deportivo La Coruna in Bilbao.

Gary Neville’s Valencia rallied to pick up a 2-1 win at Malaga.

Valencia’s opening goal was a freak blunder by Malaga goalkeeper Carlos Kameni, who sent the ball into this own net while trying to punch it away after a high cross into the area.

The ball was going past the goal when the Cameroon goalkeeper powerfully redirected it into the net with his right hand. He later complained with the referee, apparently wanting a foul from a nearby Valencia player.

Russian striker Denis Cheryshev scored Valencia’s second, moving his team into ninth in the standings with its third win in four matches.