Santi Mina scored twice as Barcelona's slim hopes of winning this season's LaLiga title ended after a 2-1 defeat to Celta Vigo at Camp Nou.
The Blaugrana entered the penultimate matchday of the season in third, four points behind leaders Atletico Madrid and two shy of second-placed Real Madrid.
But Atleti and Madrid both won, meaning Barca's challenge would have concluded early even if they had protected the lead forged by Lionel Messi.
As it was, Mina had the visitors level seven minutes before the break and then, after Clement Lenglet was sent off for a second booking, the Celta forward lashed in an 89th-minute winner.
It had all started so well for Barca, with Messi predictably at the heart of their best work up to and including his 28th-minute header.
Sergio Busquets' deep cross from the left found Messi beyond the Celta defence to nod past Ivan Villar, who had repelled the hosts' best chance to that point when he blocked from Antoine Griezmann.
But Celta levelled with their first shot, a smart Mina finish from 20 yards that wrongfooted Marc-Andre ter Stegen, apparently unsighted behind Gerard Pique.
Although that goal did not initially alter the pattern of play, Barca became increasingly impatient as they struggled to forge clear-cut openings and left gaps at the back.
A far more impressive contribution from Ter Stegen saw the goalkeeper dive to his right to deny Denis Suarez, while he tipped away an awkward free-kick moments after Lenglet earned his second card seven minutes from time for a rash challenge on Kevin Vazquez.
There was another stop from Suarez, too, and those saves might have provided a platform for a Barca winner, only for Martin Braithwaite to miss the target from close range.
The decisive goal instead arrived at the other end, with Ter Stegen caught under Augusto Solari's cross, which bounced back out off the post for Mina to blast into the net.