Liverpool’s Sadio Mane, right, escapes Porto’s Jesus Corona during the Champions League round of sixteen first leg soccer match between FC Porto and Liverpool FC at the Dragao stadium in Porto, Portugal, Wednesday, Feb. 14, 2018. (Luis Vieira/Associated Press)

PORTO, Portugal — Liverpool put one foot in the Champions League quarterfinals with a 5-0 away rout of Porto in the first leg of their last-16 match on Wednesday.

Sadio Mane scored a hat trick and Mohamed Salah and Roberto Firmino provided the other two goals to give the Premier League side a huge advantage ahead of the second leg at Anfield on March 6.

“It was hard work, but in the end the boys enjoyed it,” Liverpool coach Juergen Klopp said after the club’s first appearance in the knockout stage of the Champions League for almost nine years.

“I saw a lot of fantastic performances tonight and a result like this is only possible if everyone is really at the top of their game,” Klopp said. “They did it well and that’s the only way to be successful.”

Liverpool is the top-scoring side in the competition with 28 goals.

“We knew we were facing a great team but we weren’t expecting this,” said Porto defender Alex Telles, whose team was without injured midfielders Danilo Pereira and Andre Andre. Striker Vincent Aboubakar was also out with a muscle problem.

A mistake from Porto goalkeeper Jose Sa allowed Mane’s shot to squirm under his body after a slow start from the visitors, and Salah displayed all his class to make it 2-0 four minutes later inside the first half-hour.

James Milner hit the post but Salah was well-placed to take the rebound, lift it with his left foot and then head it past Sa before slotting into the empty net without letting it touch the ground.

It was the African player of the year’s sixth goal in the competition, and his ninth in eight games across all competitions.

The home side showed promise after the break but was caught on a counterattack when Sa saved Firmino’s effort, only to push the ball toward Mane’s feet. The Senegal striker needed no second invitation for his second goal.

Sa was playing in place of Iker Casillas, dropped earlier this season after falling out of favor with Porto coach Sergio Conceicao, who must have been reconsidering his decision after a shaky performance from the 24-year-old Sa.

At the other end, Virgil van Dijk marshaled Liverpool’s defense on his Champions League debut for the club following his winter switch from Southampton.

Firmino got the goal his performance deserved with a simple finish inside the left post from Milner’s cross with 20 minutes remaining, and Mane took advantage of some lax defending to seal the win with a fine strike from distance late on.

“We needed to play as a team and that’s what we did,” Mane said after his first hat trick for Liverpool. “We played great football, created great chances and scored five goals. I enjoyed the fifth goal the most.”

Casillas’ former side, Real Madrid, came from behind to beat visiting Paris Saint-Germain 3-1 in the other Champions League game on Wednesday.

___

More AP Champions League coverage: https://apnews.com/tag/ChampionsLeague

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.