Cape Town - Lionel Messi struck a spectacular free kick, scored another goal and set up two more in a 4-1 victory for Barcelona over nine-man city rivals Espanyol in the first leg of their King's Cup last-16 clash on Wednesday.
A second-string Atletico Madrid side secured a 1-1 draw at neighbours Rayo Vallecano, striker Saul Niguez equalising in the second half for the La Liga leaders.
Argentine Messi slotted home after 13 minutes for Barca following Felipe Caicedo's opener for Espanyol and he struck a 30-yard free kick before halftime that went in off the underside of the crossbar.
Espanyol held Barca to a 0-0 draw at home last Saturday in La Liga but the Cup holders were much more threatening this time.
Messi provided assists for Gerard Pique and Neymar in the second half while in a feisty game there were also red cards for Espanyol's Hernan Perez and Papakouli Diop.
"In derbies there is always a high tempo and they have a style of play that is always on the limit," Pique told reporters.
"The other day the referee allowed it but this time he didn't and it was easier for us to play our football."
Nacho put Rayo ahead with a low drive after 34 minutes against an Atletico side showing a number of changes and it was only after the break that the league leaders offered any real threat.
Augusto Fernandez and Claudio Kranevitter made their debuts and found it difficult to impose themselves on the game and Atletico lacked their usual solidity.
They equalised through a 15-yard strike from Saul who was set up by Luciano Vietto after 67 minutes and there were chances for both sides in the closing stages.
Arda Turan made a comfortable debut for Barca after finally being allowed to play following the end of the Fifa transfer ban but Espanyol scored first.
Marco Asensio intercepted a Dani Alves pass to set up Caicedo who beat keeper Marc-Andre ter Stegen from the centre of the area.
Messi finished clinically from an Andres Iniesta through ball and the Argentine forward cracked home a free kick which swerved in the air past Lopez before crossing for Pique to score from close range.
Espanyol lost their composure after Perez and Diop were dismissed and Neymar volleyed home from another Messi pass to complete the rout.
Striker Alvaro Negredo scored a hat-trick, including two second-half penalties, as Valencia thrashed Granada 4-0 to lift the club who have yet to pick up a La Liga victory under new manager Gary Neville.
Second-half goals from Inaki Williams, Aritz Aduriz and Aymeric Laporte helped Athletic Bilbao come from behind to beat in-form Villarreal 3-2.