The Argentine was in indomitable form as he single-handedly inspired the Blaugrana to an impressive victory over their local rivals in his coach's final home game
Four goals from Lionel Messi, taking his tally to 50 in this Liga campaign, was enough to ensure that bragging rights stayed with Barca once more. A superb free kick and a wonderful cross-goal shot were separated by two penalties for the Argentine, who is now almost a certainty for the Pichichi award.
Emotions were running high around the stadium before kick off with every Blaugrana looking to pay homage to Barca coach Guardiola. They began the game in a typically free-flowing manner and they were ahead in the 12th minute.
Messi won a free kick 25 yards from goal and got up to take it himself. From a right-of-centre position he bent the ball on goal and despite a taking a nick of Raul Baena, his effort flew just inside the post.
For their part Espanyol were doing their best to keep Barcelona's passing as far away from the final third as possible and the hosts were struggling to get a sight of goal.
Before the break Espanyol keeper Cristian Alvarez was forced into two vital stops to keep his side within touching distance of the hosts. First, he smothered the ball at Seydou Keita's feet as the Malian looked to round him in the area, then he got a strong hand to deny Andres Iniesta from a free kick.
Time to say goodbye | Camp Nou faithful declares "We love you, Pep!"
Barca shifted to three at the back for the second half, allowing Adriano to play further up as they looked to unlock their stubborn neighbours.
The move began to reap rewards as the hosts asserted their dominance in the middle of the park. The Blaugrana were awarded a penalty in the 64th minute after a handball in the area by Cristian Gomez. Messi converted via the right-hand post to score his 70th goal in all competitions this season.
Juan Forlin tested Jose Pinto with a sweetly-struck volley but soon after, Barca extended their lead and it was the imperious Messi who was on target again for his eighth La Liga hat-trick this season. The Argentine latched onto Adriano's pass and his great first touch took the ball away from Victor Sanchez and he arrowed his shot across goal and into the bottom corner.
But it did not stop there. With 79 minutes on the clock the hosts were awarded another penalty when Sergio Busquets was brought down in the area. The ball was handed to Messi and he dispatched the spot-kick before going on to celebrate his 50th Liga goal with Guardiola.
The Argentine almost added a fifth in the dying moments but his dink over Alvarez dropped just the wrong side of the post. Nevertheless Guardiola will have been happy to have ended his current spell at Barcelona in front of the home fans with such an imperious display, condemning their city rivals to mid-table obscurity in the process.