Barcelona surrendered the LaLiga title to Real Madrid as Luis Enrique's Camp Nou farewell was marked by a thrilling 4-2 come-from-behind victory over 10-man Eibar.
The Catalans needed to win and then hope Madrid lost at Malaga in order to secure a third consecutive league championship, but Zinedine Zidane's side held their nerve to prevail 2-0.
Barca – seeking a 12th straight top-flight home win – were stunned by Takashi Inui's seventh-minute opener, a fine finish that ricocheted in off the underside of the crossbar.
Luis Suarez spurned two glorious chances to level before the interval, with Eibar goalkeeper Yoel helping to preserve a shock lead, while fortune favoured Jose Luis Mendilibar's side when Lionel Messi somehow scuffed wide from six yards in the second half.
That proved costly when Inui crashed in his second off the frame of the goal, but it stirred Barca into life and David Junca's own goal cut the deficit in the 63rd minute.
A blatant dive from Jordi Alba fooled referee Alejandro Hernandez into awarding a penalty, but Yoel acrobatically kept out Messi's effort, only for Suarez to level it up three minutes later.
Messi then atoned for his spot-kick failure by converting another after Neymar had been fouled by Ander Capa, whose red card added to the drama before Messi's late solo goal sealed it.
Barça win 4-2 at home to Eibar but it is not enough to claim the league title May 21, 2017
The home side were without defensive trio Gerard Pique, Javier Mascherano and Jeremy Mathieu, meaning Marlon Santos was selected once more.
It quickly became apparent that Madrid, who needed only a draw, had taken the lead, sapping the optimism out of the Camp Nou crowd.
That sense of impending disappointment grew when Inui fired a first-time shot beyond Marc-Andre ter Stegen from Capa's searching cross.
1 - Takashi Inui has become the first Japanese player to score against Barcelona in La Liga history. Katana. May 21, 2017
Suarez contrived to fire wide at the other end immediately after, having raced clear with only the goalkeeper to beat.
The Uruguayan proved more accurate in the 14th minute, but his goal was ruled out after Alba was adjudged to have strayed offside in the build-up.
Neymar had speculative appeals for a penalty waved away as he went down under minimal contact from Junca.
A Sergi Roberto volley called Yoel into his first meaningful action after 33 minutes and the Valencia loanee did brilliantly to repel Suarez's low shot soon after.
Ruben Pena could have made matters even worse for Luis Enrique's men in the final minute of the half, but he failed to turn home the rebound from Inui's saved effort.
There was no sign of Eibar trying simply to protect their advantage in the second half, with the lively Inui denied from a tight angle inside 90 seconds of the restart.
It heralded an open start to the second period and Yoel saved smartly from Andres Iniesta's 18-yard drive before keeping out another strike from the Spain legend.
Barca were 4-0 winners in January's reverse fixture, but somehow a breakthrough continued to elude them, Messi remarkably side-footing wide from close range with Yoel laying helplessly on the floor after Suarez's square pass.
That abysmal miss was punished soon after as Inui again confounded Ter Stegen with a rifled shot that cannoned in off the bar to leave the home crowd in disbelief.
They were given a timely boost when Neymar's shot came off the foot of the post and rebounded in off the unfortunate Junca, but Barca then suffered a blow when Messi's penalty was superbly saved, which offered Eibar some justice after Alba's play acting.
Still Barca refused to relent and Suarez turned in from point-blank range after Paco Alcacer flicked on a corner, and Messi made no mistake from the spot in the 75th minute, before adding his 37th LaLiga goal at the end of a fine solo run in stoppage time.
Luis Enrique will now hope to sign off with silverware in the Copa del Rey final against Alaves next weekend.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.