Sergio Ramos scored twice as Real Madrid came from behind to record a 4-2 win over Girona in Thursday night's Copa del Rey quarter-final first leg at the Bernabeu.
Girona took a seventh-minute lead on the night through Anthony Lozano, but Madrid responded in impressive fashion to ensure that they would take a lead into the second leg of the last-eight tie next week.
Girona needed just seven minutes to make the breakthrough at the Bernabeu, with Raul Garcia's excellent cross turned into the back of the net by Lozano, who had arrived late inside the Madrid box.
Vinicius Junior has been Madrid's standout player in recent weeks, and the immediate response came from the Brazilian as he caused Girona problems with his pace and trickery down the left.
Casemiro fired an attempt over the Girona crossbar in the 12th minute, before Marcelo tested Girona goalkeeper Gorka Iraizoz with a low drive moments later as Real continued to press.
The home side's equaliser arrived in the 18th minute when Alvaro Odriozola drove into the Girona box before playing a clever pass into Lucas Vazquez, who swept the ball into the back of the net.
Karim Benzema had a super chance to send Madrid ahead three minutes later following smart work from Vinicius, but the Frenchman smashed the ball over the crossbar from a good position, before Iraizoz kept out an attempt from Odriozola moments later.
Vinicius was next to come close for Los Blancos just before the half-hour mark, with the Brazilian's curling effort from outside the box just too high of the Girona goal.
Real continued to find holes in Girona's defence as the first period approached its latter stages, but the visitors were also having joy in the final third, with Lozano and Seydou Doumbia both causing problems.
VAR had a look at a potential penalty late in the first half when Luka Modric was challenged by on-loan Manchester City attacker Douglas Luiz, but play continued without the award of a spot kick.
Madrid did have a penalty moments later, however, with Lozano clipping Vinicius inside the box. Ramos stepped forward and the Los Blancos captain effortlessly clipped the ball down the middle of the goal for 2-1.
Benzema clipped the outside of the post late in the first half as Los Blancos looked for more and the half-time whistle came at the right time for Girona, who desperately needed to regroup.
Madrid also had the first opportunity of the second period when Marcelo clipped a dangerous cross onto the head of Modric, but his effort dropped just wide of the post.
Iraizoz then made a sharp save to keep out an attempt from Benzema moments later as the pressure continued.
Girona were struggling to get out of their own half as the match approached the hour, with Marcelo and Odriozola almost playing as wing-backs for the home side.
Marcos Llorente and Toni Kroos came off the Madrid bench either side of the hour, with their returns boosting a squad which has been depleted by injuries in 2019.
Llorente's first serious action was to concede a penalty, however, with a handball from the Spaniard seeing Girona level the scores from the spot in the 66th minute - Alex Granell stepping forward to find the back of the net.
Madrid's response was again impressive though and the home side regained the lead in the 77th minute when Ramos rose highest inside the Girona box to head a Marcelo cross past Iraizoz.
Los Blancos then had their fourth in the 81st minute when Vinicius's low cross was turned into the back of the net by Benzema at the far post.
Both teams committed players forward in the latter stages in a bid to score the game's seventh goal, but 4-2 was how it finished, leaving Madrid with a two-goal advantage ahead of the second leg in Catalonia.
REAL MADRID (4-3-3): Courtois; Odriozola, Nacho, Ramos, Marcelo; Ceballos (Isco 70'), Modric (Kroos 63'), Casemiro (Llorente 59'); Vinicius, Benzema, Vazquez
GIRONA (5-3-2): Iraizoz; Ramalho, Alcala (Espinosa 46'), Juanpe, Muniesa, R Garcia; Luiz, B Garcia (Paik 59'), Granell; Doumbia, Lozano (Portu 79')