Karim Benzema scored two late goals as La Liga champions Real Madrid beat Espanyol in a thrilling finale.
Vinicius Jr gave Real the lead from a clever Aurelien Tchouameni ball.
Joselu levelled with a rebound after Thibaut Courtois saved his first effort and the experienced striker had other chances to give Espanyol the lead.
Benzema volleyed in Rodrygo’s cross to give Real the lead and he added a third from a free-kick against makeshift goalkeeper Leandro Cabrera.
Espanyol’s starting goalkeeper Benjamin Lecomte was shown a straight red card in the sixth minute of injury time for a professional foul on Dani Ceballos – after a long video assistant referee review.
The hosts had a goalkeeper on the bench but had used their three substitution windows so had to put captain Cabrera in goal instead.
He was rooted to the spot as Benzema – who also had a goal disallowed for offside – curled the resulting free-kick into the bottom corner. That was his 327th goal for Real and his first from a direct free-kick.
Defending champions Real have won their opening three games of the La Liga season.
Espanyol, without a win this season, will rue their missed chances when the game was 1-1.