LEVERKUSEN, Germany (AP)Xabi Alonso’s debut as a Champions League coach didn’t go as planned.

Two goals for Mehdi Taremi from the penalty spot and superb goalkeeping from Diogo Costa lifted Porto to a 3-0 win at Bayer Leverkusen on Wednesday, strengthening the Portuguese team’s bid to qualify for the Champions League knockout stage and leaving Leverkusen last in Group B.

A Champions League winner as a player with Liverpool and Real Madrid, Alonso took over as Leverkusen coach last week, after Gerardo Seoane was fired following a 2-0 loss to Porto away. It’s the first time that Alonso has been a first-team head coach after stints with youth and reserve teams in Spain.

Costa found Galeno with a searching long-range kick into the Leverkusen half in the sixth minute, and the forward cut inside from the left flank and scored as two Leverkusen defenders collided while trying to stop him.

In the first of many contentious calls, referee Istvan Kovacs booked Leverkusen’s Mitchel Bakker for diving soon after but then had to reverse the decision and give a penalty after video review showed the Dutch left back had been tripped. Costa, who saved a Leverkusen penalty last week, did well again as he stopped Kerem Demirbay’s spot kick to preserve Porto’s lead.

Leverkusen’s frustration grew as Amine Adli seemed to have leveled the score in the 35th minute, only for video review to show his offside teammate Patrik Schick was blocking Costa’s view.

Galeno won two second-half penalties to help Porto extend its lead, first for contact with Adli and then for a clumsy challenge by Odilon Kossounou. Both times, Iran forward Taremi stepped up to beat Leverkusen keeper Lukas Hradecky from the penalty spot.

Even as it dominated the scoreline, Porto allowed Leverkusen plenty of chances in defense, but a mix of Costa’s goalkeeping and poor decision-making by Leverkusen in the penalty area stopped the German team scoring.

In the other game in Group B, Club Brugge drew 0-0 at Atletico Madrid to secure qualification for the last 16.

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP-Sports