Gerard Pique rescued 10-man Barcelona in a pulsating Catalan derby against Girona after Clement Lenglet was shown a red card at the Nou Camp.
Barca were leading 1-0 when defender Lenglet was dismissed in the 35th minute for elbowing Pere Pons.
Girona levelled through Cristhian Stuani before the Uruguay forward rifled the visitors into the lead.
Despite playing with 10 men, Barca carved out the better chances and Pique headed the equaliser.
The Spanish champions lead La Liga on goal difference from Real Madrid, who beat Espanyol 1-0 on Saturday.
Lenglet dismissal costly for Barca
Ernesto Valverde’s team were the last side in La Liga with a 100% winning record after taking 12 points from their opening four domestic games.
They beat Girona 6-1 in the corresponding fixture last season and were expected to maintain their winning start to the campaign.
However, the dismissal of Lenglet swung the match in Girona’s favour.
The French defender, who was making his first league start for the club after joining from Sevilla, raised his elbow at Pons.
The referee left the pitch to view the replay of the incident on a screen before returning to show a red card.
Barca, who face struggling Leganes on Wednesday, continued to dominate possession and this will feel like two points dropped despite playing more than half the game with 10 men.
Girona impress at the Nou Camp
This is a result which Girona fans will remember for years to come.
As recently as 2007 they were playing in the fourth tier of Spanish football.
There will be disappointment they did not hold on to their lead with an extra man advantage but they survived as Barcelona bombarded their penalty area in the closing stages in search of a winner.
Girona included two players on loan from Manchester City – Spanish midfielder Aleix Garcia started while young Brazilian midfielder Douglas Luiz came on as a substitute.
English forward Patrick Roberts, who is also on loan from City, was an unused substitute.