(CNN) -- Brazilian superstar Kaka celebrated his return from injury by scoring Real Madrid's winner against 10-man Zaragoza on Saturday night, keeping the pressure on Spanish leaders Barcelona.
Kaka ended a six-week absence as he came off the bench in the second half and slotted home his eighth goal this season with eight minutes to play to give Real a 2-1 away win that left the capital club a point behind defending champions Barca.
The midfielder, who cost $100 million when he signed from AC Milan in June, fired in a low effort across goalkeeper Roberto after running into the box to collect a precise pass from fellow big-money acquisition Cristiano Ronaldo.
Ronaldo was also involved when Real, knowing they had to win after Barcelona's earlier 3-1 victory against bottom club Xerez, finally took the lead five minutes after halftime.
The Portugal forward was quickest to react after Roberto could only first parry a low shot by Gonzalo Higuain and then block the former Manchester United star's own attempt, and veteran forward Raul was in the right place to sidefoot home the resulting cutback pass.
Raul, who came on for injured Dutch midfielder Rafael van Der Vaart in the first half, also hit the post in the 26th minute.
Zaragoza, just two points above the relegation zone, were reduced to 10 men only a minute after Raul's goal when Matteo Contini was sent off for aiming an elbow at Higuain -- the Argentine went down clutching his face even though the on-loan Italian defender's limb appeared to strike his chest.
Raul also left the pitch with an injury, to be replaced by French forward Karim Benzema.
But the home side, promoted back to the top flight this season, shocked Real by equalizing in the 61st minute as on-loan striker Adrian Colunga broke free on the counterattack and rounded goalkeeper Iker Casillas to slot the ball into the empty net.
Sergio Ramos headed against the Zaragoza woodwork from Guti's free-kick as Real pressed for a winner, which came after the 75th-minute introduction of Kaka.
Barcelona bounced back from the 3-1 midweek defeat against Inter Milan, which followed a long bus trip to northern Italy due to the volcanic ash cloud that closed Europe's airspace.
Coach Josep Guardiola rotated his squad ahead of Wednesday's second leg of the Champions League semifinal, and Jeffren and Thierry Henry took advantage of their call-ups to put the Catalans 2-0 up inside 25 minutes.
The 22-year-old winger Jeffren curled in a fine 14th-minute effort after linking with Xavi, while France forward Henry was set up by strike partner Zlatan Ibrahimovic.
Xerez pulled one back just a minute later with a fierce shot from Mario Bermejo that caught Barca napping after a mistake by defender Dmitro Chygrynskiy, but Ibrahimovic restored the hosts' two-goal cushion 11 minutes as halftime after Ivory Coast midfielder Yaya Toure laid on an easy chance.
Xerez ended the match with nine men as Matias Alustiza and Fabian Orellana were red-carded for bad tackles in the final minutes, and are now six points from safety with four matches to play.
It was Xavi's 200th victory in 349 appearances in a Barcelona shirt, extending his club record.
"It was a dangerous game because however much you prepare tactically, your mind is on last Tuesday's match and the one we will play on Wednesday against Inter," Guardiola told reporters.
"Today we played thinking about Inter, and it was inevitable because it's just so important for us."
Valencia consolidated third place with a 1-0 victory at home to Deportivo La Coruna in the late match, with striker David Villa scoring the only goal from the penalty spot in the 34th minute after defender Ze Castro handled the ball.
Los Che moved seven points clear of fourth-placed Mallorca, who host Malaga on Monday.
The only blot on the night was the late sending-off of substitute Rubens Baraja, who received two quickfire yellow cards.
The first spell also ended on a bizarre note as the referee blew for halftime before the required 45 minutes were played, and then had to restart the match after protests from both sides.