Barcelona: Seydou Keita's stoppage-time header gave 10-man Barcelona a 2-2 draw at Real Betis on Saturday, ensuring coach Pep Guardiola would not lose his final league game at the helm of the dethroned Spanish champions.
Sergio Busquets opened for Barcelona in the ninth minute at Seville's Benito Villamarin Stadium.
But Betis looked set to get the win after Ruben Castro scored twice following Dani Alves' sending off in the 53rd until Keita rose up to head in Martin Montoya's last-gasp cross.
Barcelona's all-time leading scorer Lionel Messi was unable to add to his league-record 50 goals. Real Madrid forward Cristiano Ronaldo can extend his total of 45 on Sunday when the league champions play Mallorca.
Barcelona have a chance to collect their 14th piece of silverware under Guardiola in his last game in the May 25 Copa del Rey final against Athletic Bilbao. Assistant Tito Vilanova will then take over from Guardiola after the four most successful seasons in the history of the Catalan club.
"The league was here before me and will continue to exist when I am gone," said Guardiola, adding that he did not know how long it would be before he returned to the sidelines.
Busquets' and Keita's goals extended Barcelona's club record to 114 goals this season. Real already set the league record with 117 goals with a game to play.
Busquets put the visitors ahead nine minutes in when he turned Xavi Hernandez's corner kick into the far corner of the goal with a header at the near post.
Betis, who had already accomplished their mission of staying up after being promoted last summer, didn't manage a shot on goal before halftime.
Dani Alves left Barcelona with 10 men when he received his second booking for a hard foul on Jefferson Montero.
"Dani Alves' sending off changed the game," Guardiola said.
On speculation that the defender would be leaving the club this offseason, Guardiola said, "He is an irreplaceable player although his future doesn't depend on me now. He has been crucial to this team and I hope that he continues to be so."
The loss of the Brazil right back made Guardiola send on youth player Montoya for Ibrahim Afellay, who was making his first start of the season after returning from a long absence due to a torn knee ligament.
But Castro eventually broke through Barcelona's depleted side.
Roque Santa Cruz flicked on a long pass for Castro to run onto and chip over Barcelona goalkeeper Victor Valdes in the 71st, and three minutes later Castro slotted by the Spanish international after Benat Etxebarria played him clear with a pass that beat Barcelona's offside trap.
They were the Spanish striker's 15th and 16th goals of the season.
As the clock ticked past the 90-minute mark, Messi sent a free kick off the post before Keita grabbed the late equalizer. The Mali midfielder floated into the area, jumped over a defender and turned Montoya's pass beyond the sprawling Betis goalkeeper.
"(Keita) is a player that can provide things that other midfielders don't have," Guardiola said.
Earlier in San Sebastian, Real Sociedad beat Valencia 1-0 thanks to Antoine Griezmann's goal to end the season in the lower-middle part of the table.
It was the last game for coach Unai Emery, who had already led Valencia to a third place finish and Champions League appearance for the third consecutive year.
Former Valencia player Mauricio Pellegrino will take over for Emery.
Also on Sunday, it's: Levante vs. Athletic Bilbao, Malaga vs. Sporting Gijon, Getafe vs. Zaragoza, Racing Santander vs. Osasuna, Rayo Vallecano vs. Granada, and Espanyol vs. Sevilla.