(CNN) -- Real Madrid ended a difficult week on a high note after coming from behind to defeat bottom-of-the-table Osasuna 3-1 at the Bernabeu, despite the visitors taking a shock first-half lead.
Madrid players congratulate Sergio Ramos after his equalizing goal against Osasuna on Sunday.
Following the resignation of club president Ramon Calderon on Friday and the boardroom in-fighting that preceded and followed his decision -- Los Meringues' week looked to be getting even worse when Javad Nekounam nodded Osasuna into a 19th-minute lead from Jaroslav Plasil's pinpoint cross.
It was the first goal Real had conceded since the 2-0 defeat to Barcelona in mid-December.
But Osasuna, who conceded two late goals to lose to Barcelona last weekend, gifted the hosts an equalizer when goalkeeper Roberto allowed Sergio Ramos' tame shot to loop over his body.
Argentine Gonzalo Higuain tapped-in his 12th goal of the season just after the hour mark after being set-up by Arjen Robben -- and Dutchman Robben added a third in the final minute.
Osasuna unlucky finished the match with 10 men after Juanfran was sent off for diving in the area, despite Pepe's challenge on him appearing to be a penalty.
The result sees the Spanish champions move up to second place in the Primera Liga table above Sevilla on goal difference. However, they remain a massive 12 points behind runaway leaders Barcelona.
Elsewhere, Valencia remain fourth but they are now four points behind Madrid and Sevilla after a 3-2 defeat at Athletic Bilbao, while Villarreal ended a miserable run of form with a 2-0 triumph over Real Mallorca to move up to fifth.
Villarreal had taken one point from their last 12 but a Joan Capdevila strike and a Giuseppe Rossi penalty got them back on the winning trail.