Gonzalo Higuain smashed home a superb 16th-minute opener after Cristiano Ronaldo had earlier missed horribly from the penalty spot.
But Ronaldo recovered to beautifully create a second for Mesut Ozil in the 20th minute and got on the scoresheet himself five minutes after the break with a simple header from Ozil’s corner, his 44th league goal of yet another prolific season.
Ronaldo still trails Lionel Messi by two goals in the goalscoring race after the Barcelona genius picked up his ninth hat-trick of the season, and second against Málaga, in all competitions for Barcelona after Carles Puyol had given Barca the lead. The win ended Barcelona’s three games winless streak.
Elsewhere, Atlético Madrid, Athletic Bilbao’s opponents in the UEFA Europa League final, drew 1-1 with Real Sociedad and Valencia strengthened their grip on third place following a 4-0 home win against Osasuna.