Real won when Benzema scored in the 10th minute
Late in the first half, Joselu needed two shots in the box to bring down Thibaut Courtois and level the score.
The game in the second half was balanced, before Benzema shone in the final minutes.
Espanyol: Lecomte, Olivan, Cabrera, Calero, Gil, Garder, Exposito (Dani Gomez 89), Puado (Ribaudo 78), Costa (Bare 69), Sanchez, Joselu
Real Madrid: Courtois, Vazquez (Carvajal 85), Militao, Rudiger, Alaba, Modric (Camavinga 58), Tchouameni, Kroos (Ceballos 80), Valverde (Rodrygo 58), Benzema, Vinicius.
Karim Benzema scored a brace in the 88th minute, helping Real beat hosts Espanyol 3-1 in the third round of La Liga on August 28.
The match at Cornellà-El Prat was dramatic with 13 minutes of injury time. In the 88th minute, when the score was 1-1, Rodrygo crossed the ball low for Benzema to cushion close in an unaccompanied position, putting Real ahead.
In the second minute of injury time, Rodrygo escaped but was unable to get the ball when he was tackled by goalkeeper Benjamin Lecomte and an Espanyol defender.
Substitute midfielder Dani Ceballos stormed in and fell close to the penalty area after a dispute with Lecomte, sending the ball to Rodrygo’s place for him to finish into an empty net.
Initially, the referee did not recognize the goal when determining the Brazilian striker was offside at the finish.
But after being consulted by the VAR team and going to the border to review the video, referee Mario Melero drew a direct red card at Lecomte when he determined the Espanyol goalkeeper had hit Ceballos’ leg.
At this time, Espanyol replaced only three people but used all three substitutions, so centre-back Leandro Cabrera had to be the goalkeeper for the rest.