Lionel Messi scored a hat-trick as Barcelona moved back to the top of La Liga with an emphatic 5-2 victory over Real Mallorca on Saturday. Real Madrid had climbed three points clear after beating Espanyol but Ernesto Valverde’s side were at their vibrant best as they dispatched their visitors, Mallorca, at the Camp Nou.

Antoine Griezmann dinked home the opening goal after being played through by Barcelona’s goalkeeper Marc-André ter Stegen, six-times Ballon d’Or winner Messi twice curled home from outside the area and Luis Suárez netted a brilliant backheel.

Ante Budimir scored with a deflected effort for Mallorca in the first half and subsequently doubled his tally by nodding home but Messi smashed a shot in late on to complete his hat-trick and round off an impressive win for the Catalans.

Messi presented his sixth golden ball award to the supporters before the game, before showing why he is considered the best player in the world. Barcelona sizzled in attack, with Griezmann dinking the ball over Manolo Reina to break the deadlock after seven minutes.

Barcelona constantly threatened and Messi whipped home the second from distance 10 minutes later, curling the ball effortlessly into the top-left corner. Budimir pulled one back for Mallorca with an effort that deflected off Clément Lenglet but Messi soon stroked home his second.

Suárez scored the pick of the bunch two minutes before half-time, powerfully backheeling past Reina after being set up brilliantly by Frenkie de Jong. Budimir headed in a second with Ter Stegen out of position but Messi wrapped up the win by rifling home his third, a record 35th La Liga hat-trick.

Real Madrid kept the pressure on Barcelona at the top with a 2-0 victory over Espanyol at the Bernabéu. Goals from Raphaël Varane and Karim Benzema secured Zinedine Zidane’s side a fourth straight league win, despite Ferland Mendy’s late dismissal.

Zidane was without the injured Gareth Bale and Eden Hazard, so started the teenage wingers Vinicius Junior and Rodrygo together for the first time. The pair were involved in Real’s best moments early on as they tried to break down an Espanyol side that had not won in the league since October.

Karim Benzema helped Real Madrid keep the pressure on Barcelona with the second goal in their win over Espanyol. Photograph: Quality Sport Images/Getty Images

Real, wearing their green third kit rather than their usual white to raise climate change awareness, had their first effort in the sixth minute when 19-year-old Vinicius cut in from the left and forced a save out of the former Real goalkeeper Diego López. Six minutes later it was the turn of Rodrygo to have a sight of goal but, when a corner was cleared to him on the edge of the area, the 19-year-old curled his effort harmlessly wide.

Soon afterwards Vinicius charged forward before slipping in Benzema down the left but the former France striker shot harmlessly at López. Espanyol had their first real sight of goal in the 27th minute when Esteban Granero’s header forced Thibaut Courtois into a diving save, but seconds later Real had broken down the other end and López had to extend his left foot to keep out Vinicius.

Real finally found a way through eight minutes before half-time and it came from an unlikely source. Benzema threaded a ball into Varane, who was still forward following a corner, and the centre-back slotted low into the far corner for his first club goal since March.

Real pushed for a second to kill the game after the break, with the left-back Mendy firing wildly over from the edge of the area and Benzema forcing another impressive save from López.

Benzema should have settled the game with 19 minutes left but, after brilliant work by Vinicius down the left, the striker failed to hit the target from near the penalty spot. Espanyol were still in the game and Courtois had to be alert to save Marc Roca’s long-range effort with 13 minutes left.

Benzema made the game safe in the 79th minute, lashing home from close range after exchanging passes with Federico Valverde in the penalty area. Real had Mendy dismissed after he picked up a second booking in the 83rd minute but Espanyol were unable to cause any problems as the game petered out.

In the day’s other matches Valencia came from 2-0 down to score an impressive 4-2 away win over Levante, and Granada beat Alavés 3-0.