PORTO, Portugal (AP) 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 tie 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.

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.

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.

Firmino got the goal his performance deserved with a simple finish inside the left post from James Milner's cross with 20 minutes remaining and Mane took advantage of some lax defending to complete his hat trick late on.

It was Liverpool's first appearance in the knockout stages of the Champions League for almost nine years.

Real Madrid 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