Lionel Messi's hat-trick set a new Barcelona scoring record of 234 goals as the La Liga champions won an action-packed home game against Granada 5-3 to close to within five points of La Liga leaders Real Madrid on Tuesday.
The Argentine World Player of the Year, still only 24, also set a Spanish record of 54 goals in all competitions in a single season with more than two months of the campaign remaining and overhauled Cristiano Ronaldo to top the La Liga scoring charts on 34 goals.
After Xavi's fourth-minute opener at the Nou Camp, Messi made it 2-0 in the 17th minute to match Cesar Rodriguez's 60-year-old mark of 232 goals.
Barca seemed in complete control but Granada pulled a goal back 10 minutes into the second half when Diego Mainz nodded in from a free kick and the visitors grabbed a shock equalizer from the penalty spot seven minutes later after Daniel Alves fouled Daniel Benitez.
Guilherme Siqueira kept his nerve to beat Victor Valdes and make it 2-2 before Messi restored Barca's lead just over 20 minutes from time.
He sped clear from an Alves pass and lifted the ball over Granada goalkeeper Julio Cesar to set a new all-time scoring record before substitute Cristian Tello made it 4-2 in the 82nd minute when he followed up from Messi's angled strike.
Messi completed his hat-trick four minutes later, his 234th Barca goal in official matches, and in an eventful finale Alves was shown a second yellow card and dismissed for a handball in the area.
Siqueira beat Valdes from the spot for a second time as Granada became the first team to put three goals past Barca at the Nou Camp this season.
Real Madrid play their game in hand at struggling Villarreal on Wednesday and have 71 points from 27 matches. Barca, chasing a fourth successive title, have 66 from 28 games.