Luis Suarez saved Barcelona's unbeaten La Liga record this season by salvaging a 1-1 draw at Atletico Madrid on Saturday in a match laced with political tension amid Catalonia's drive for independence.
Saul Niguez's spectacular strike had given Atletico an early advantage.
However, Barca's dominance for large spells paid off when Suarez finally got the better of the outstanding Jan Oblak to level nine minutes from time.
"Everyone knows Atletico defend very well and have a great goalkeeper, but we did enough to believe we deserved more in the second half," said Suarez.
A share of the points allows Real Madrid to move up to second, five points behind Barca, as Cristiano Ronaldo struck an 85th-minute winner - his first league goal of the season - to grind out a hard-fought 2-1 win for the European champions at Getafe.
Atletico move up to third but remain six points behind the leaders.
"It was a great game between two teams with very different characteristics," said Atletico boss Diego Simeone.
A backdrop of Spanish flags and chants of "Viva Espana" (long live Spain) met Barca on their first visit to the Spanish capital since a Catalan independence referendum marred by violence and deemed illegal by the Spanish government on October 1.
However, both managers lauded the atmosphere.
"The stadium was marvellous," added Simeone.
"I loved the stadium, the fans, (jeers for the opposition) are normal, but it was a great night of football for everyone," said Barca boss Ernesto Valverde.
The 68,000 crowd at Atletico's new Wanda Metropolitano were nearly silenced inside 30 seconds by Lionel Messi.
The five-time world player of the year rescued Argentina's floundering World Cup qualifying campaign with a stunning hat-trick in the altitude of Quito, Ecuador on Tuesday to ensure his presence at next year's showpiece in Russia.
And Messi nearly had another brilliant solo effort to add to his 17 goals for club and country this season as he weaved past a series of Atletico challenges before firing into the side-netting.
"Messi was extraordinary. Every time the ball went through him there was danger," added Simeone.
Barca defender Gerard Pique, an outspoken supporter of Catalonia's right to self-determination, was loudly jeered every time he touched the ball.
However, Antoine Griezmann was also driving Pique to distraction as he nutmegged the Spanish international to bear down on goal only to be denied by a stunning stop from Ter Stegen.
The German stopper was helpless on 21 minutes when Saul cut inside onto his supposedly weaker right foot before unleashing a drive into the bottom corner from 20 yards.
Barca went onto dominate possession, but had to wait until 10 minutes into the second half to force Oblak into a save when Suarez stung the Slovenian's palms from outside the box.
Seconds later Messi sent a curling free-kick off the outside of the post and then fired his best chance of the match wastefully wide 19 minutes from time.
However, after another outstanding Oblak save to deny Suarez, Barca's pressure was rewarded when Sergi Roberto picked out an unmarked Suarez at the back post and his downward header had too much power for Oblak.
And Suarez should have won the game two minutes from time when he failed to connect with Andre Gomes's teasing cross.
Earlier, Ronaldo rode to Real's rescue and made amends for his earlier profligacy with a late winner.
"The game is 90 minutes long and we know that we can score at any moment," said Madrid boss Zinedine Zidane.
Madrid looked on course for a comfortable three points when Karim Benzema fired the visitors into a deserved half-time lead.
However, Jorge Molina controversially equalised 11 minutes into the second half as he appeared to be offside as he bundled home from close range.
Ronaldo then missed an incredible chance as he skewed wide with the goal at his mercy before grabbing the winner.
Sevilla slip down to fourth thanks to a 1-0 defeat at Athletic Bilbao with Mikel Vesga scoring the only goal of the game.
Athletic Bilbao 1
(Vesga 43) Sevilla 0
(Molina 56) Real Madrid 2
(Benzema 39, Ronaldo 85)
Alaves 0 Real Sociedad 2
(Oyarzabal 77, Elustondo 81)
Atletico Madrid 1
(Saul Niguez 21) Barcelona 1