Vinicius Junior late equalized Real Madrid in his 100th appearance for the club in a 1-1 draw at home against La Liga rivals Real Sociedad.
The Brazilian substitute saved a point for Real Madrid by shooting point blank in the 89th minute after Portu gave the visitors a lead in the second half.
But it was not enough for Zinedine Zidane’s side to move Barcelona up to second place and they are five points behind city leaders and rivals Atletico Madrid, who have a game in hand. .
The hosts dominated the first half and hit the woodwork twice, but couldn’t force that elusive first goal.
Mariano’s point-blank header on Lucas Vazquez’s excellent cross and Raphael Varane’s looped header on the next turn both hit the crossbar.
Casemiro threw a 25-yard shot right off and Toni Kroos’ effort was blocked after the German passed two defenders.
Luka Modric then forced Real Sociedad goalkeeper Remiro to make a reaction stoppage after the Croatian crushed a defender at the edge of the penalty area.
But Real Sociedad were transformed early in the second half and – after forcing three successive turns – they took the lead thanks to Portu.
Former Manchester City winger David Silva orchestrated the move and from Nacho Monreal cross Portu rose to send a stunning header into the woodwork in the 55th minute.
The visitors missed a chance to extend their lead when Portu failed to spot unmarked Alexander Isak in the area.
Casemiro steered Vazquez’s cross narrowly off target and Rodrygo shot wide as Real Madrid continued to equalize.
The hosts again threatened by Casemiro following the reduction of substitute Hugo Duro and with time running out they finally rose to the level.
Federico Valverde’s rear wheel freed Vazquez on the wing and Vinicius Junior, a 61st minute replacement for Isco, finished in the bottom corner.
Real Madrid took a leap forward in the finals, but Real Sociedad were keen to stop the home side’s five-game winning streak.