BARCELONA, Spain (AP)Winding down a difficult season, Barcelona pulled out a 2-1 victory at Real Betis after Jordi Alba struck a last-gasp winner on Saturday.

Barcelona strengthened its hold on second place in the Spanish league behind newly crowned champion Real Madrid, which clinched the title last weekend.

The loss for Betis dealt a blow to its hopes of qualifying for the Champions League with a top-four finish.

Atletico Madrid, in fourth, was three points ahead of Betis in fifth before it hosts Real Madrid in a derby on Sunday.

The 19-year-old Ansu Fati, who had just recently returned from another long injury layoff, broke the deadlock in the 77th from a pass by Alba just one minute after he went on.

Betis looked set to salvage a crucial point when Marc Bartra equalized in the 80th. But Alba smashed home a left-footed volley from a cross by Dani Alves deep in stoppage time. The referee blew the whistle just seconds after play restarted.

”We are happy for our effort, our sacrifice today. It has proven to be a tough season, which we will end without a title,” said coach Xavi Hernandez, who replaced Ronald Koeman in November. ”The team showed spirit and a good attitude, that is why we are in second place.”

Barcelona’s players greeted Betis with an honor guard to mark their Copa del Rey title. The cup rewarded Betis with a Europa League spot next season that it wants to upgrade to a Champions League ticket.

BLOWOUTS AT THE BOTTOM

Three matches that had implications in the relegation fight ended in lopsided results.

Granada rolled past Mallorca 6-2 with two from 40-year-old striker Jorge Molina. Granada’s biggest league win of the season let it escape the drop zone and push Mallorca into the bottom three heading to the second division.

Cadiz’s 3-0 win over Elche left it one point ahead of Granada.

Iago Aspas scored twice to help Celta Vigo rout Alaves 4-0 and leave it in last place.

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP-Sports