(CNN) -- Lionel Messi's remarkable La Liga scoring streak came to an end on Sunday as Barcelona celebrated reclaiming the Spanish title with a less than convincing 2-1 win at Atletico Madrid.
Messi started his first domestic match since the end of March, but was taken off in the 68th minute having apparently failed to recover from the injury problems that have dogged the latter part of his season.
It meant his run of having scored in 21 successive league matches came to a halt, but Barca did recover from 1-0 down when he left the pitch despite needing to complete the match with only 10 men having made all possible replacements.
The victory that leaves the Catalans on course to match Real Madrid's points record from last season.
Having clinched a fourth title in five seasons when second-placed Real could only draw with Espanyol on Saturday, Barca went behind five minutes after halftime in the Spanish capital.
Gabi dispossessed Gerard Pique and fed the ball to striker Radamel Falcao, who netted his 28th goal this season to stay third in the "Pichichi" scoring stakes behind Messi (46) and Cristiano Ronaldo (34).
Alexis Sanchez leveled the score five minutes after Messi departed, toe-poking in a low shot after combining well with Cesc Fabregas for his 10th in La Liga. The Chilean was then booked after taking off his shirt to reveal a Mother's Day message.
Barca's winner came with 10 minutes to play, and was equally unrepresentative of the elegant play usually associated with the club.
Striker David Villa scuffed a shot which deflected off Diego Godin and -- apparently going wide of the goal -- then hit Gabi before bobbling into Thibaut Courtois' net.
Ugly as it was, it means Barca can equal Real's tally of 100 points by winning the last three games.
Atletico stayed third after the defeat, but can still win a trophy this season by beating city rivals Real in next Friday's Copa del Rey final.
Valencia climbed into the fourth Champions League place with a 4-0 win at midtable Rayo Vallecano, moving a point above Real Sociedad -- who host Granada on Monday.
Sixth-placed Malaga drew 0-0 with Sevilla, while seventh-placed Real Betis won 1-0 at home to second-bottom Celta Vigo, with Ruben Castro scoring the second-half winner.
Paris Saint-Germain clinched a first Ligue 1 title since 1994 after winning 1-0 at third-placed Lyon on Sunday.
Midfielder Jeremy Menez scored the only goal in the 53rd minute to put big-spending PSG seven points clear of Marseille with two matches to play.
It gave coach Carlo Ancelotti a league title in three countries, having previously won in Italy with AC Milan and in England with Chelsea, while star striker Zlatan Ibrahimovic celebrated a championship in his fifth different nation.
January signing David Beckham came on for a brief cameo in time added on, and is now the first English player to be involved in title-winning teams in four countries.
It also represented the first trophy for PSG's Qatari owners, who have spent a reported $320 million on players since taking a controlling share in 2011.
"We fulfilled our objectives of winning the Ligue 1 title and going a long way in the Champions League," said Ancelotti, whose team reached the quarterfinals of Europe's top club competition before losing to Barcelona on away goals.
"The squad has worked very hard and were always very professional."
The club's president Nasser Al-Khelaïfi added: "I am delighted to have won this title after two very tough years. We deserve to win this trophy. We were happy that Marseille won yesterday, because we wanted to win the league with a victory in this match.
"It's a magnificent moment for the club and our supporters. I am so proud of our fans who have been right behind us through thick and thin. They deserve this title too after 19 years."