Madrid (AFP) – Real Madrid captain Sergio Ramos produced more late drama by powering home a stoppage-time winner to beat Deportivo 3-2 as the European champions set a new club record of 35 games unbeaten in all competitions.

Two goals in two minutes from Joselu just after the hour mark looked set to end Real’s unbeaten streak stretching back to April after Alvaro Morata’s opener.

However, even without the rested Cristiano Ronaldo, Real maintained their six-point lead at the top of La Liga as Mariano Diaz equalised six minutes from time before Ramos’s late intervention.

Zinedine Zidane’s men have now surpassed Real’s previous record mark of 34 games unbeaten from the 1988/89 season under Dutch coach Leo Beenhakker.

Zidane made a host of changes ahead of Real’s trip to Japan for the Club World Cup in the week ahead with Ronaldo left out of the squad alongside Karim Benzema and Luka Modric.

James Rodriguez had Real’s best chance before the break, but he fired straight at Przemysław Tyton when clean through on goal.

Indeed, the European champions were exceptionally lucky not to be behind at the break as Celso Borges headed against the post and the rebound somehow escaped Guilherme with the goal gaping.

Madrid looked to be on track for the three points early in the second half when Morata turned 25 yards from goal and arrowed a drive into the far corner.

However, the game was turned on its head in a two-minute spell as on-loan Stoke City forward Joselu — formerly of Madrid — struck his first two Deportivo goals.

Madrid were incensed that the referee didn’t blow for a foul on Casemiro in the build-up to the equaliser before Carles Gil teed up Joselu to smash the ball in off the underside of the bar.

Real were still rocking from that blow when they were caught cold by another Deportivo counter-attack and this time Joselu drilled the ball between the legs of Keylor Navas.

High up in the VIP boxes of the Bernabeu, Ronaldo cut an increasingly frustrated figure at not being able to ride to the rescue of his teammates.

In his absence, Mariano was handed a rare first-team opportunity off the bench and took his chance to shine with a looping header from Lucas Vazquez’s cross that left Tyton helpless.

The Polish goalkeeper then suffered an injury when colliding with the post as he made a save in stoppage time.

And Tyton had only just got back to his feet when a week after scoring a last minute equaliser against Barcelona in the Clasico, Ramos powered another header into the net from Toni Kroos’s corner.

Barcelona remain second in La Liga as Lionel Messi scored twice in their 3-0 win at Osasuna earlier on Saturday.