
Barcelona bounced back from back-to-back defeats to beat Real Madrid in the Copa del Rey semi-final first leg.
An Eder Militao own goal separated the sides at the Bernabeu despite the hosts having more possession and chances.
It is a welcome result for Barca after they lost to Manchester United in the Europa League and Almeria in La Liga.
Xavi's side defended deep after taking the lead and their discipline earned a narrow advantage to take into the second leg at the Nou Camp on April 5.
In Barca's first attack of the game, Franck Kessie's shot was saved by Thibaut Courtois but ricocheted back off Militao and rolled into the net.
His fellow centre-back Nacho attempted to clear the ball off the line but was unable to save his team-mate's embarrassment.
It was initially ruled out for offside but VAR indicated that while Raphinha had moved early he was not interfering with play while Kessie was level and as a result the goal stood.
Barca's defence has conceded just eight goals in 23 league matches this season and although there were extensive changes in personnel, the backline stood strong again on Thursday.
