Real Madrid coach Santi Solari hailed "warrior" Sergio Ramos after the defender's double helped his side to a 4-2 victory in Thursday evening's Copa del Rey quarterfinal first leg at home to Girona.

An entertaining game at the Bernabeu swung back and forth as Anthony Lozano and Lucas Vazquez swapped goals before Ramos' panenka penalty put Madrid 2-1 ahead before the break.

After Girona had equalised through Alex Granell's penalty early in the second half, the Blancos club captain appeared up field in open play to head his side in front again, with Karim Benzema's late strike from Vinicius Junior's cross putting their team in control of the tie ahead of next Thursday's second leg at Girona's Montilivi stadium.

Solari accepted a local reporter's suggestion at the postgame news conference that Ramos could play centre-forward if required, and added he was happy with the "Panenka" approach which has seen the defender convert all seven of the team's spot kicks since former taker Cristiano Ronaldo left last summer.

"I wouldn't rule it out," the Argentine replied, tongue slightly in cheek. "Sergio is a warrior, a leader. He showed that in defence, and in the opposition area heading his second goal, just like a centre-forward. He took the penalty like that [panenka], he's a specialist, so perfect. He doesn't just take them like that, but in many different ways."

The burgeoning relationship between centre-forward Benzema and 18-year-old winger Vinicius -- who was involved in three of Madrid's four goals -- means Solari will have a difficult calls to make when more established attacking duo Gareth Bale and Marco Asensio get back to fitness in the coming weeks.

"Each game is a new battle," Solari said when asked whether the Brazilian teenager would keep his place when everyone was fit. "We will see. The important thing is that we get Bale and Asensio back, and Vinicius and Benzema maintain this level of performance. Sometimes you get this natural understanding between two players, it happens in training too. Today we all played very well. It is important that each player lifts his level as that improves the competitive level of the squad."

Both Girona goals were avoidable, with recalled left-back Marcelo caught out badly for the first and a daft handball from substitute Marcos Llorente leading to Girona's penalty, but Solari said that on balance he had to be happy with how his team played.

"This is football," he said. "It is what this sport has. You can dominate or deserve to win, but if you do not take your chances and the other team does even though they create less.

"That was the feeling at 2-2, but we had to keep doing our jobs. Then, fortunately, we got an advantage. We are going home happy with the commitment, the performance and the play today. The tie is still open and the return will be an attractive game."