Luis Suarez scored twice to help Barcelona to a 4-1 victory over Espanyol in the clash of the Catalans at the Nou Camp.
The Uruguayan's double briefly made him the top scorer in La Liga with 12 goals, until teammate Lionel Messi moved back level with him in the last minute.
It also ended Espanyol's 10-game unbeaten run and edged the Spanish champions to within three points of leaders Real Madrid.
Barca had won the last five home meetings with their city neighbours, scoring 19 goals and conceding just one in the process.
But this appeared a far sterner test than in recent years against an Espanyol side who had kept seven clean sheets in their previous nine matches.
All that separated the sides at the interval was Suarez's opener, but two moments of Messi magic in the space of 60 second-half seconds put Barca out of sight.
Suarez, who this week handed Barca a boost by extending his contract with the club until 2021, created the first chance with a trademark burst forward.
He fed Neymar on the left, and the Brazilian fizzed in a low cross which Messi crashed into the sidenetting.
But in the 18th minute Andres Iniesta looped a stunning pass over the top which Suarez controlled superbly before racing ahead of Diego Reyes and rolling the ball across keeper Diego Lopez into the net.
The hosts did not have everything their own way in the first half, though, with Gerard Moreno heading wide and Javi Lopez firing an angled drive over the crossbar.
After the break Neymar combined with Messi to set up another opportunity for Suarez but Lopez came out quickly to block his effort.
However, Lopez hurt himself in making the challenge and limped off to be replaced by back-up keeper Roberto.
Messi took the game away from Espanyol in the 67th minute with a mesmerising dance past four players before shooting at Roberto.
The substitute made the save but could not hold onto the ball and Suarez pounced to snap up the rebound.
Moments later Messi went on another mazy run, and this time as he stumbled out of another challenge Jordi Alba was on hand to lash the ball home.
Espanyol grabbed a consolation 11 minutes from time when Moreno cushioned an inviting ball for David Lopez to crash into the net.
But Messi was not to be denied and grabbed his goal with a minute to go, rounding off another stellar performance by firing home after Suarez's chip put him through.