Lionel Messi set the record for the most Spanish league appearances by a non-Spanish player on Sunday, but the Argentine's goal couldn't prevent 10-man Barcelona from dropping its first points of the season in a 2-2 draw with Girona.
Messi, the league's all-time leading scorer, overtook former teammate Dani Alves of Brazil by appearing in his 423nd game.
Messi gave Barcelona the lead before Clement Lenglet was given a red card in the first half.
Girona striker Christian Stuani struck twice for the visitors before Barcelona salvaged a point through Gerard Pique's goal in the 63rd.
Referee Gil Manzano showed Lenglet a direct red card for elbowing Girona's Pere Pons in the face. Manzano made the ruling after consulting the video monitor to review the contact between the players.
"It's clear that the sending off swung the match," said Barcelona coach Ernesto Valverde.
Valverde took responsibility for not sending on center back Samuel Umtiti on sooner to fill the hole left by Lenglet that Stuani took advantage off to get his first goal just before halftime.
"You are planning to do something but you wait, and then ... you regret it all. I thought we had the match under control," Valverde said.
Barcelona had won all its previous four rounds of the Spanish league, its Champions League opener and the Spanish Super Cup.
Its first setback of the season left Barcelona level with Real Madrid at the top of the league on 13 points.
Messi put Barcelona ahead in the 19th when he used his left boot to stab in a pass from Arturo Vidal after the midfielder had won the ball.
Messi had already gone close to scoring what would have been a brilliant goal when he dribbled around three defenders, sending two of them to the turf, before his low shot was tipped wide by goalkeeper Yassine Bounou.
The Argentina forward also hit the cross bar with a free kick before Pique made up for his sluggish defending on both of Stuani's goals by heading Barcelona level.
BEN YEDDER HAT TRICK
Wissam Ben Yedder scored a first-half hat trick to lead Sevilla to a 6-2 rout at Levante, equaling the biggest winning margin away from home in the league for the Andalusian club.
It was the second big win for Sevilla in three days. Ben Yedder scored twice in a 5-1 home win over Standard Liege in the Europa League on Thursday.
Sevilla goalkeeper Tomas Vaclik saved a penalty kick by Jose Morales that would have allowed Levante to pull level at 2-2 midway through the first half.
Pablo Sarabia also scored for Sevilla and set up three more goals.
Sevilla had gone three rounds without a win in the league.
Valencia is still looking for its first win this season after coach Marcelino Garcia and team captain Dani Parejo were both sent off with a half-hour to play in a 0-0 stalemate at regional rival Villarreal.
Parejo got a straight red card for a dangerous low tackle on Funes Mori, and Garcia was sent off moments later for protesting the dismissal. Both player and coach watched the rest of the match behind the glass of a stadium box.
Valencia hasn't scored in three straight matches, including a 2-0 loss at home to 10-man Juventus in the Champions League midweek when Cristiano Ronaldo was sent off.
"It's true we haven't won in several matches but we can't lose our cool," Valencia defender Jose Gaya said. "We still have to improve, but we also have to remain positive that the wins will come."
Real Betis needed goals from Marc Bartra and Sergio Canales to erase a two-goal deficit in a 2-2 home draw with Athletic Bilbao.