Barcelona recovered from two goals down to beat plucky 10-man Eibar 4-2 at Camp Nou in their final La Liga game of the season, but it was not enough to wrest the title from rivals Real Madrid.
The Catalan giants headed into the final round of fixtures knowing that they needed to beat Los Armeros and also hope for a huge helping hand elsewhere, but Madrid beat Malaga 2-0 on the Costa del Sol to come out on top.
Other results very nearly did not matter, though, as Barca were made to do things the hard way in Luis Enrique's Camp Nou bow, falling a couple of goals behind and missing a string of chances, only to hit back with four goals in 30 minutes to end their league campaign with a seventh successive win.
Just moments after news filtered around Camp Nou of Cristiano Ronaldo's key opener for Madrid at Malaga, Barca found themselves a goal down after Takashi Inui was given plenty of space to rifle home a right-sided cross via the underside of the bar.
It was poor defending from the hosts, who had to field youngster Marlon Santos in their backline once again due to the illness absence of Gerard Pique and further injuries elsewhere.
Luis Suarez squandered Barcelona's best chance to level up in the first half, placing the ball wide with the outside of his boot when played clean through by a dismal backpass.
The Uruguayan thought that he had got the better of Yoel soon after, only for the linesman's flag to correctly go up due to Jordi Alba being offside in the build-up.
Ivan Rakitic picked out the Eibar stopper from Sergi Roberto's pullback and Suarez was again thwarted from another one-on-one, this time denied down low, yet the visitors could well have gone into the break with a two-goal lead.
Goalscorer Inui produced a top save out of Marc-Andre ter Stegen from distance, and Ruben Pena could only stick the rebound wide of goal from just a few yards out.
Inui was proving to be a real threat, almost squeezing home a second moments after the restart if not for a big Ter Stegen hand at his front post, before Andres Iniesta was twice kept out by Yoel from similar positions.
There was a sense that it just was not going to be Barca's night 56 minutes in when Suarez refused to take on the shot and instead laid it off for Messi, who took a touch yet still failed to find the target from six yards out.
It looked to prove costly, too, as Inui belted home his second on the half-volley soon after when Sergi Enrich helped the ball into his path, seemingly putting Eibar on their way to their first point against Barca.
Los Armeros could not hold on, though, conceding a few minutes later to a David Junca own goal after Neymar's shot came back off the post and hit the unfortunate defender before trickling over the line.
A crazy spell in the game then followed as, after a penalty was wrongly awarded for a supposed trip on Alba - despite nobody being around him - Messi was denied by Yoel from the spot, a minute or so before Suarez finished at the back post following a smart flick-on from substitute Paco Alcacer.
There was more drama to come thanks to a second Barcelona penalty, this time correctly given after a foul on Neymar from Ander Capa that saw him shown a second yellow card.
Yoel got a hand to Messi's latest attempt but could not quite keep it out, and there was still time for the division's Golden Boot winner to round off the scoring with a fourth in added time, tucking the ball into the bottom corner after shimmying his way into the box.