Barcelona threatened to throw it away, but they cliniched a second successive Liga title with an 3-0 victory over Granada at Los Carmenes on Saturday.
Luis Enrique's team led the way in the top flight for the majority of the season, with the formidable front three of Lionel Messi, Luis Suarez and Neymar spearheading the league's most prolific attack.
An April blip ended a Spanish record 39-game unbeaten run and threatened to see the trophy move across to the capital, with Atletico Madrid and Real Madrid in hot pursuit, but a vital three points on the final day of the season enabled them to retain the title at the expense of Zinedine Zidane's men.
Here, we take a look at the matches that proved crucial to Barca topping the table for a second straight season:
Barcelona 5-2 Rayo Vallecano - Camp Nou, October 17
After suffering their first defeat of the season, losing 4-1 at Celta Vigo, Barca suffered another blow three days later when talismanic forward Messi was ruled out for two months with a knee injury in the 2-1 victory over Las Palmas.
The solid early-season form of Luis Enrique's side then looked to be wavering when they suffered a 2-1 loss against Sevilla in their first match without Messi before going 1-0 down to Rayo inside 15 minutes of their clash at Camp Nou the following week.
In Messi's absence, though, Neymar stepped up with an imperious display. The Brazilian's trickery won two first-half penalties, which he converted to turn the game around, and a pair of routine finishes after the interval saw him score four for the first time in a single Barca game.
Neymar then supplied an exquisite cross to set up Suarez for the fifth as the Catalan side overcame the first major hurdle of their season, providing the launch pad for their mammoth unbeaten run.
Real Madrid 0-4 Barcelona - Santiago Bernabeu, November 21
Messi was only fit enough for the bench by the time the season's first Clasico came around.
Consequently, Sergi Roberto, who had been operating at right-back, was deployed in a more advanced role. It only took him 11 minutes to make his mark, releasing Suarez to curl the opening goal beyond Keylor Navas with the outside of his right foot.
Neymar ensured Barca went into the break with a two-goal lead when he poked home from an Andres Iniesta throughball, and their roles reversed as the Spain international fired the former Santos forward's neat flick into the top-right corner.
Messi made his return after 55 days out as a substitute and played a role in the move which ended with Suarez dinking in a fourth, prompting a cacophony of whistles inside the Bernabeu and opening up a six-point advantage over their arch-rivals in an astonishing Clasico success.
Barcelona 2-1 Atletico Madrid - Camp Nou, January 30
There was nothing separating Barca and Atletico Madrid when they met in front of 93,000 fans at a packed Camp Nou.
Although Barca held a game in hand due to their participation in the Club World Cup, this was a game of great magnitude. It did not get off to the greatest of starts as Koke turned Saul Niguez's cutback beyond Claudio Bravo after 10 minutes.
A near-post dart and sweeping finish inside the upright from Messi brought the defending champions level, before Suarez held off the challenge of Jose Maria Gimenez to poke the ball beneath Jan Oblak.
Atletico had Filipe Luis dismissed for a high challenge on Messi before the interval and, after Bravo made a great save to keep out Antoine Griezmann, Atletico were reduced to nine when Diego Godin slid in wildly on Suarez. Diego Simeone's side were unable to avoid defeat, slipping three points adrift of the leaders.
Deportivo La Coruna 0-8 Barcelona - Estadio Riazor, April 20
Barca had built a nine-point advantage at the summit, but a 2-1 defeat at home to Real Madrid brought their record unbeaten streak to an end and sparked a dip in form that threatened to derail their season.
Atletico sent them out of the Champions League at the quarter-final stage and took full advantage of the Catalans' three straight Liga defeats to move level on points at the top.
However, talks of a crisis were emphatically swept aside in this pivotal victory.
Suarez opened the scoring when he volleyed home from inside the six-yard box, and a brilliant pass from Messi enabled him to make it 2-0 at half-time.
A phenomenal second half saw Deportivo completely dismantled, with Suarez taking his individual tally to four after setting up Ivan Rakitic with a brilliant cross two minutes after half-time. The Uruguayan was provider again when his phenomenal turn and pass preceded Messi slotting home the sixth, before Neymar completed the rout by putting an end to a run of five matches without converting, adding to Marc Bartra's solo strike.
Granada 0-3 Barcelona - Estadio Nuevo Los Carmenes, May 14
Barca's title defence came down to the final match of the season, with Real Madrid trailing Luis Enrique's men by a single point heading into the final round of fixtures.
Cristiano Ronaldo found the net twice for Madrid as they cruised to a routine 2-0 victory over Deportivo, but it was not enough thanks to Suarez's exploits at Granada.
The former Liverpool and Ajax striker was on hand with a hat-trick that took him to 40 goals for the season in a 3-0 win, becoming the first player other than Messi or Ronaldo to surpass 38 in a single La Liga campaign since Hugo Sanchez in 1989-90.
And the wider rewards were greater, with maximum points clinching a 24th Spanish title for Barca, leaving Madrid to settle for second once again.