Barcelona slumped to a shock 2-1 defeat at lowly Deportivo La Coruna on Sunday and lost top spot in La Liga to Real Madrid, who recovered to beat Real Betis 2-1 thanks to a header by the irrepressible Sergio Ramos. Just four days after Barca's heroic 6-1 Champions League last 16 win over Paris St Germain that put the French side out, the Catalans were knocked off their domestic perch by Deportivo as they lost in the league for the first time since October. Depor defender Alex Bergantinos headed the winner late on after Luis Suarez had cancelled out Joselu's first-half strike. Real fought back after a calamitous own goal from keeper Keylor Navas gave Betis the lead in the 25th minute, just after the Costa Rican escaped a possible red card. Cristiano Ronaldo pulled the hosts level in the 41st with a diving header. Betis had defender Cristiano Piccini sent off for a second booking in the 78th and three minutes later Ramos nodded in his 10th goal in all competitions this season, adding to his header in the 3-1 win at Napoli in the Champions League on Tuesday. Real lead the standings on 62 points, Barca are second with 60, and Sevilla are third on 57 after a 1-1 draw at home to Leganes on Saturday. Real have a game in hand on their rivals. Betis were incensed when referee Antonio Mateu Lahoz waved play on after winger Darko Brasanac slipped through Real's high defensive line to hurtle towards goal and was knocked over by the advancing Navas, who could have been sent off. The goalkeeper seemed fazed by the incident, however, and a couple of minutes later allowed a tame shot from Antonio Sanabria through his hands and knocked the ball over the line with his glove, covering his face to hide the embarrassment. Betis were denied a penalty later in the half when Sanabria was knocked over by Dani Carvajal and a few minutes later Ronaldo pounced on poor defending from the visitors to equalise. Ramos completed the turnaround by leaping to head in a Toni Kroos corner and Navas made amends for his earlier blunder by keeping out a close range header from Sanabria. "This is a very complicated stadium where the demands are infinite and when players make mistakes they need support. Keylor saved us at the end and I'm happy he has recovered from their goal," Ramos told reporters. "It was a strange game, we did some things well but Betis defended well and they scored with the few chances they had which put us up against it, but it was vital to win today to go top." Deportivo's former Real Madrid youth trainee Joselu gave them a deserved lead in the 40th minute against Barca after an error from visiting keeper Marc-Andre ter Stegen, though Suarez restored parity in the 46th with a powerful drilled effort. Defender Bergantinos headed Deportivo back in front after 74 minutes and Barca, who were without Neymar through a thigh injury and clearly missed the Brazilian's creative impetus, failed to recover a second time. Suarez was denied by a brilliant save from goalkeeper German Lux as Barcelona suffered their first defeat since they were beaten 4-3 at Celta Vigo, also in Galicia, on Oct. 2. The win moved Depor eight points clear of the drop zone. "We let them get into the game for too long in the first half and this is what football is like, when you give a team an advantage they always punish you," Suarez told reporters. "The PSG result did not cost us today, we've had enough days to recover. Deportivo are fighting relegation and we knew it was going to be difficult here but we're not going to give up the fight for La Liga." Elsewhere, Villarreal moved above Real Sociedad into fifth on goal difference with a 1-0 win at Celta Vigo, capitalising on Sociedad's 2-0 home loss to Athletic Bilbao in a Basque derby.