There were a few nerves at the end but Liverpool set up a Champions League semi-final with Spain's Villarreal after Roberto Firmino scored twice in a 3-3 second-leg draw with Benfica on Wednesday to ensure a 6-4 aggregate win.

Juergen Klopp's side had been 3-1 up on the night before the visitors struck twice late in the game to create a jittery finale to what had appeared to be a comfortable passage.

The Lisbon side exited the competition with the applause of their own fans -- and Liverpool's -- ringing in their ears after delivering a performance full of belief and commitment until the end.

With a 3-1 lead from the first leg in Lisbon, Liverpool manager Klopp made seven changes to the team which drew with Manchester City at the weekend, but his squad showed their improved strength in depth with Luis Diaz and Kostas Tsimikas particularly impressing.

"It was not exactly what we wanted but it is absolutely not important," said Klopp.

"If we played the best game of the season tonight it wouldn't have made it more likely to get to the final. We are through and that's all that matters and I'm really happy," said the German.

Benfica winger Everton went close with a curling shot before Liverpool took the lead with a powerful header from a corner by defender Ibrahima Konate in the 21st minute to settle any nerves for a makeshift lineup.

Konate, who had also scored in the first leg, rose well to meet Tsimikas's corner and give Liverpool a three-goal cushion.

Benfica responded positively though with Darwin Nunez having a delicate chip over Alisson Becker ruled out for offside.

The visiting fans were able to celebrate though when Benfica pulled level through Goncalo Ramos, who beat Alisson after a tackle from James Milner had fallen to him on the edge of the box.

Brazilian Firmino scored twice after the break as Liverpool looked to make sure of a place in the semi-finals for the third time in five seasons.

He made it 2-1 in the 55th minute after Benfica keeper Odysseas Vlachodimos spilled the ball out, his defenders could not clear their lines and Diogo Jota's slightly mis-hit cross was turned in by the Brazilian at the back post.

Firmino's second goal was a more elegant affair -- Tsimikas floating a free kick over the Benfica defence for the striker to beat Vlachodimos with a side-footed volley.

But Benfica stuck at the task well and pulled two goals back in the latter stages to return a degree of tension to Anfield.

Substitute Roman Yaremchuk made it 3-2, the Ukrainian forward latching on to a through ball from Alejandro Grimaldo and rounding Alisson before sliding his finish into the empty net.

The goal was initially flagged for offside but allowed after a video review.

It was a similar story for their equaliser on the night with Nunez's effort also ruled out, after Benfica sprung Liverpool's offside trap, before the intervention from VAR.

The impressive Nunez had an effort disallowed in stoppage time but this time VAR backed the on-field call and Liverpool could evade what might have been a scary final few minutes.

Liverpool's thoughts will now turn to their FA Cup semi-final with Premier League title rivals Manchester City at Wembley on Saturday.

But for Benfica, it was an honourable exit from the tournament as their fans recognised with long and loud appreciation after the final whistle.

"All Benfica fans must be proud of this campaign. We had a difficult group stage, and then faced Ajax and Liverpool. As we advanced the opponents became more difficult, but we gave a good account of ourselves," said Benfica manager Nelson Verissimo.