Lionel Messi scored four goals to take his La Liga tally to 50 this season as Barcelona hammered Espanyol 4-0 on Saturday in an emotional last game at the Nou Camp for outgoing coach Pep Guardiola.
Thousands had turned out with flags and banners paying tribute to Guardiola and what he has achieved for the club during his four-year spell in charge.
Barcelona may have conceded their 2011 league title to arch-rivals Real Madrid last week, but three-time FIFA Ballon d'Or winner Messi gave the Nou Camp a boost by pulling ahead of Cristiano Ronaldo in the race for the league's
top scorer title.
Messi netted twice from the penalty spot, once from a free kick and the other was a low finish into the corner following a thrilling breakaway.
After scoring his fourth from the spot, a record 72nd goal in all competitions this season, the World Player of the Year
ran to the touchline and hugged Guardiola as the rest of the squad gathered to join them in a huddle.
Second-placed Barca have 90 points with one match left, seven behind champions Real Madrid who won 2-1 at Granada.
Cristiano Ronaldo scored a penalty and Granada's David Cortes put through his own net at the end to leave Real on
course for a record 100 La Liga points. The Portuguese international striker is now on 45 league goals, five behind Messi with one league match remaining.
Jonas scored in added time to give Valencia a 1-0 home win over regional rivals Villarreal that secured them third place and the last automatic qualifying berth in the Champions League for the third year in a row.
Valencia have 61 points and Malaga are fourth on 55 after falling 2-1 at Europa League finalists Atletico Madrid who
closed to within two points in fifth.