|Ibrahimovic celebrates scoring for Barca [AFP]
Kaka came off the bench after six weeks out injured and produced a clinical finish from Cristiano Ronaldo's assist to keep Real Madrid hot on the heels of leaders Barcelona in the Spanish Primera Division on Saturday.
After Barca's nervy 3-1 win at home to basement side Xerez in the earlier kickoff, Brazil's World Cup-bound playmaker Kaka struck eight minutes from time to fire Real to a nail-biting 2-1 victory at 10-man Real Zaragoza.
Substitute Raul put Real ahead after 50 minutes and in a heated atmosphere at Zaragoza's Romareda stadium the home side had defender Matteo Contini sent off soon after following a clash with Argentina striker Gonzalo Higuain.
Promoted Zaragoza, two points above the relegation places in 16th, fought back to level at 1-1 through Adrian Colunga in the 62nd minute before Kaka saved the day for big-spending Real.
The result lifted Manuel Pellegrini's side to 86 points with four matches remaining, one behind Barca and 24 ahead of third-placed Valencia, who won 1-0 at home to Deportivo Coruna thanks to David Villa's 34th-minute penalty.
Kaka, who replaced Fernando Gago with 15 minutes remaining, has been sidelined with a lingering groin problem.
His extended absence has led to accusations he lacks commitment to the team he joined from AC Milan for about 67 million euros ($90 million) in the close season.
"The best thing I can do is answer (my critics) on the pitch," Kaka, who will be key to Brazil's bid for glory in South Africa, said in a post-match TV interview.
"I ask the Real Madrid fans to believe in my injury," he added.
"I am not hurt (by the criticism), I know that things are like that in football."
Barca face the formidable task of overturning a 3-1 deficit in their Champions League semi-final second leg at home to Inter Milan on Wednesday and Pep Guardiola left top scorer Lionel Messi and several other regulars out of his starting lineup.
The hosts were cruising when Jeffren and Henry put them 2-0 ahead after 24 minutes but a fine strike from Mario Bermejo a minute later and sustained Xerez pressure at the start of the second half shook the home fans.
The introduction of Messi and Spain defender Gerard Pique in the 52nd minute appeared to settle Barca down and Ibrahimovic sidefooted home from close range four minutes later to make it 3-1 after smart work from Yaya Toure.