Captain Karim Benzema scored twice in a wild finish as Real Madrid won 3-1 at Espanyol to preserve their 100 per cent record after three games of the La Liga season.
Vinicius Junior's tidy finish was cancelled out by a goal from Joselu, who has made a habit of scoring against Madrid since spending three years early in his career with the capital club's 'Castilla' B team, reports DPA.
Benzema had a goal ruled out after the break, while Joselu almost pinched another, before Benzema turned in a cross from Rodrygo to snatch the points. Espanyol goalkeeper Benjamin Lecomte was sent off in stoppage time and Benzema added his second from the subsequent free-kick as the game ended chaotically.
The result means Madrid move level on nine points with Real Betis, the next opponents for Carlo Ancelotti's team and the only other side with a perfect record.
Vinicius fired Madrid into a 12th-minute lead, meeting a smart pass from Aurelien Tchouameni close to the penalty spot and tucking a first-time shot past Lecomte and into the bottom-left corner.
However, it was Espanyol who struck next, equalising in the 43rd minute. Joselu took Oscar Gil's throughball on board and scored at the second attempt after Courtois made an initial save, with the ball rebounding kindly off Eder Militao for the home striker.
Joselu was in the thick of the penalty-area drama again just before the hour mark when Courtois had to desperately push away his left-footed strike amid a scramble.
Lecomte repelled a 20-yard curling strike from Benzema at the other end, before Madrid's talisman and captain had a goal disallowed for offside after he prodded in a low ball from Toni Kroos.
As the game entered its closing stages, Benzema met Rodrygo's expertly crafted cross from the left, tucking in a close-range volley at the far post to thoroughly deflate the hosts.
There was still time for more drama, Lecomte red-carded in stoppage time after a wild attempted tackle on Dani Ceballos just outside the penalty area. Benzema fired the set-piece from 20 yards beyond stand-in goalkeeper Leandro Cabrera, the captain and defender not quite up to the job.