Ten-man Real Madrid suffered a surprise defeat by Real Sociedad as the visitors earned their first victory at the Bernabeu in La Liga for 15 years.
Things then got more difficult for Real Madrid when Lucas Vazquez was sent off with half an hour remaining.
Sociedad made the extra man count when Ruben Pardo headed in a late second.
The defeat leaves Real Madrid one point and one place outside the Champions League qualification spots in fifth, while Sociedad move up to 11th after ending a four-match losing streak in the league.
Willian Jose got the visitors off to a perfect start when he hammered his penalty high down the middle and it was from the former Real Madrid striker’s cross that Pardo nodded past goalkeeper Thibaut Courtois with seven minutes to go.
Vazquez, who collected a second booking for a trip on Merino, went closest for the European champions as he hit the post from a cross before the break.
The hosts handed a first start in La Liga to Brazilian Vinicius Junior, with the 18-year-old becoming the first player to start for Real Madrid in the competition born in 2000 or later.
The lively forward curled narrowly wide after a clever run across the top of the box, and was then denied a penalty despite appearing to be fouled by Real Sociedad goalkeeper Geronimo Rulli – the video assistant referee opted not to intervene.
Rulli also kept out Raphael Varane’s close-range shot before denying Sergio Ramos twice in quick succession and palming away Vinicius’ side-footed volley.
Real Madrid were without Wales forward Gareth Bale because of a calf injury, while Spain midfielder Isco started among the substitutes.
Santiago Solari’s side have now failed to win in both their league matches since returning from their Club World Cup success in December.