Gareth Bale came off the bench to a chorus of jeers before helping Real Madrid seal a 3-1 win over Real Sociedad at the Bernabeu.
Willian Jose had given the visitors a shock lead inside two minutes, punishing a poor defensive backpass from Los Blancos captain Sergio Ramos.
Karim Benzema equalised from Luka Modric's free-kick, before a deflected shot from Federico Valverde put the home side in front.
Wales forward Bale was sent on for the closing stages with whistles ringing in his ears, following the latest country versus club row during the international break.
Bale, though, kept his cool to send over a deep cross which led to Modric wrapping things up with a third goal as Real Madrid moved back level on points with leaders Barcelona.
Los Blancos had earlier made the worst possible start as Ramos gifted the visitors a goal inside two minutes.
The defender looked to knock a diagonal ball back to Thibaut Courtois from the left touchline.
Ramos, though, was not aware to the danger of Willian Jose – who latched onto the stray pass before rounding the goalkeeper to mark his 30th birthday with a memorable goal.
Eden Hazard looked to lead the response, latching onto a perfectly-weighted through ball from Karim Benzema, but could only find the sidenetting.
Sociedad, who had made an impressive start to the season under Imanol Alguacil, were in again after 14 minutes as Mikel Oyarzabal charged down the flank before cutting the ball back to Martin Odegaard.
The midfielder laid a pass off to Willian Jose, but Courtois produced a fine reaction save from the striker's first-time effort.
Hazard remained Real's best outlet, and weaved his way into the Sociedad penalty area before his low drive was saved by Alex Remiro.
Norweigan Odegaard – playing against his parent club on a season loan – then tested Courtois with a long-range effort as the visitors refused to be overawed.
Los Blancos, though, equalised after 37 minutes.
Modric floated over a free-kick from the right, and Benzema arrived in the six-yard box to knock the ball in off his shoulder for a 10th LaLiga goal this season.
Real Madrid enjoyed a slice of good fortune at the start of the second half as they went in front in the 47th minute.
Modric picked out Federico Valverde in a central position some 20 yards out, and his shot deflected off Oyarzabal and flew past Remiro.
Bale headed off to warm-up and being greeted by plenty of jeers. The 30-year-old was criticised in Spain after being pictured celebrating Wales' Euro 2020 qualification victory over Hungary in midweek with a flag which read "Wales. Golf. Madrid. In that order".
Sociedad, though, continued to offer a threat, and Odegaard sent a curling effort at Courtois after the ball broke at the edge of the penalty area.
Hazard was put in by Valverde, but his shot was straight at the Sociedad keeper.
Bale, who had missed Madrid's last six matches after suffering a calf injury on international duty, came on in the 67th minute, with large sections of the home crowd making their feelings clear.
Despite the hostile atmosphere, the former Tottenham man remained focused and was soon in the thick of the action, as he darted down the right before cutting a deep ball back across goal.
Benzema knocked down a cushioned header, with Modric lashing his shot past Remiro on the half-volley to make it 3-1 in the 74th minute.
The Bernabeu slowly warmed to Bale again, as his determined runs remained a threat during the closing stages and Benzema then saw a rising drive pushed over in stoppage time.
No Data Analysis info