Barcelona restored their two-point lead at the top of La Liga when Lionel Messi finished a slick move to fire the champions to a hard-fought 2-1 home win over Malaga on Saturday.
Pep Guardiola's side were under pressure after Real Madrid's in-form striker Gonzalo Higuain had struck twice to lead them to a 5-1 win at Tenerife in the earlier kickoff.
Real's sixth straight victory briefly sent them a point clear at the top on 59 points from 24 matches before Barca replied by seeing off stubborn Malaga.
The Andalucians were pinned back from the start at the Nou Camp where Argentina forward Messi and Swedish striker Zlatan Ibrahimovic having early chances.
Ibrahimovic flashed a long-range freekick just wide of the post in the 24th minute and Messi shot wastefully over the bar five minutes later.
The visitors defended resolutely, with Weligton in the thick of the action, and the Brazilian cleared an Ibrahimovic header off the line just before the hour.
Pedro, in the starting lineup in place of France forward Thierry Henry, finally broke the deadlock in the 68th minute with a superb long-range strike but Valdo stunned the home side with a breakaway equaliser in the 81st.
Malaga looked to have secured an unlikely point before Spain midfielder Xavi split their defence with a perfectly weighted pass for right back Daniel Alves and the Brazilian squared for Messi to tap in an 84th-minute winner.
Keep up with the latest business news from the region with the Emirates Business 24|7 daily newsletter. To subscribe to the newsletter, please click here.