Captain Sergio Ramos scored twice as Real Madrid closed in on a place in the Copa del Rey semi-finals with a 4-2 win over Girona at the Bernabeu.

Santiago Solari's men recovered from the shock of conceding a seventh-minute opener to their ailing LaLiga rivals with a performance which ought to seal their place in the last four.

And there was better news for the home fans, who not only saw their side build on the weekend win over Sevilla but also the second-half return of Toni Kroos after two weeks out due to injury.

The visitors kicked off the quarter-final first leg without a win in their last eight games but made an immediate impression, grabbing the lead when Anthony Lozano converted a Raul Garcia cross into the box.

The hosts responded by piling on the pressure with both Casemiro and Marcelo testing Girona keeper Gorka Iraizoz while the busy Luka Modric had a good shot blocked.

The inevitable equaliser arrived in the 17th minute through the impressive Alvaro Odriozola, who cut in from the wing before cleverly drawing the ball back for Lucas Vazquez to slot home.

An almost identical move six minutes later ought to have given Real the lead but Karim Benzema failed to lift the ball over a grateful Iraizoz in goal.

But Real did go ahead for the first time in the 37th minute after Vinicius was tripped in the box by Lozano, enabling Ramos to step up and beat Iraizoz with another 'Panenka' strike from the spot.

Benzema grazed the upright in first-half injury-time while the introduction of Kroos for Modric in the 63rd minute could not prevent Girona pulling level.

Alex Granell kept his nerve with the second penalty of the night after Marcos Llorente had needlessly handled a deep cross from the visitors into the box.

Solari's men resumed their dominance with Isco coming close before they restored their advantage in the 77th minute when Ramos timed his run perfectly to head home from a Marcelo cross.

And Real put themselves in a dominant position to progress after the second leg when they snatched a fourth goal four minutes later, Vinicius brilliantly squaring for Benzema who slotted home from close range.