Barca hit Zaragoza for six
Real and Barca had both lost in Europe in midweek but after a depleted Madrid side drew 0-0 at Sporting Gijon on Saturday, Pep Guardiola's team grabbed their chance to pull emphatically away at the top of the standings.
Barca have 22 points from eight matches to Real's 19, and Sevilla remain in third, three points further back, after being held to a 0-0 draw at home to Espanyol on Saturday.
Zaragoza kept a dominant Barca at bay for the first 24 minutes at the Nou Camp until Keita leapt to nod Lionel Messi's precise cross into the top left-hand corner.
Ibrahimovic doubled their lead five minutes later with a thunderous, long-range free-kick that Juan Pablo Carrizo could only palm into the roof of the net and the Sweden striker then turned provider just before the break.
Xavi sent him clear on the left and he squared for Keita to thump the ball into the empty net.
The Mali midfielder returned the favour 11 minutes after the break when he crossed for Ibrahimovic to volley past Carrizo for his seventh La Liga goal, taking him joint top of the scoring charts, before Jorge Lopez beat Victor Valdes with a low drive.
Lionel Messi made up for several missed chances when he lifted the ball over Carrizo for Barca's fifth, and his sixth of the season, and Keita completed the rout with another fine header in the 86th.
Guardiola said criticism after Tuesday's Champions League defeat to Russian champions Rubin Kazan at the Nou Camp had helped focus the players' minds and he paid tribute to the raw power of Ibrahimovic's free-kicks.
"You should see him in training," Guardiola told a news conference. "When he shoots our keepers tremble with fear."
David Villa netted his seventh goal of the season and Pablo Hernandez scored with a superb lob as Valencia climbed to fourth with a 3-0 victory at Almeria, who had goalkeeper Diego Alves sent off in the 63rd minute.
Valencia took the lead at the Juegos Mediterraneos stadium in the 54th minute when Hernandez raced clear and crossed for Villa to nod past Alves.
Alves was shown a straight red card after he chopped Hernandez down outside his area and the Valencia winger then caught his replacement, Esteban, off his line with a perfectly weighted lob from distance.
Juan Mata made sure of the points with a well-struck shot three minutes from the end of normal time.
Villa's Spain team mate Joan Capdevila swept in a free-kick to give Villarreal a 2-1 home win over Malaga for a first la Liga victory this season that lifted them off bottom spot.
Ernesto Valverde's Villarreal side took the lead at the Madrigal in the 27th minute when striker Nilmar slid in at the far post to clip Damian Escudero's low cross high into the net.
Albert Luque equalised in first-half added time with a powerful downward header before Capdevila curled a left-foot strike around the wall into the bottom corner of the net just before the hour.
"It cost us a lot of effort (tod