MILAN (AP)Inter Milan advanced to the Champions League knockout stage and eliminated Barcelona in the process.

Inter beat Viktoria Plzen 4-0 on Wednesday to secure at least second spot in Group C with a match remaining, consigning Barcelona to its second straight group-stage elimination even before the Spanish club lost 3-0 to Bayern Munich later.

And, to cap a great night for Inter, the final goal was scored by Romelu Lukaku, four minutes after making his comeback as a late substitute following two months out with injury.

”Lukaku will be very important for us,” Inter coach Simone Inzaghi said. ”We lost him for two months . now he’s coming back in the best way possible and with a crazy hunger.”

Edin Dzeko scored two of Inter’s other goals, after Henrikh Mkhitaryan’s opener.

Inzaghi was suspended for the match following his late red card in the 3-3 draw at Barcelona, so assistant Massimiliano Farris was on the touchline.

Plzen managed to contain Inter’s attacking threat in the early stages although the home side had a triple chance to take the lead in the 25th minute.

Federico Dimarco’s angled shot was parried by Jindrich Stanek but the move continued. The goalkeeper pulled off another good stop to keep out Mkhitaryan’s header from point-blank range and Dimarco sent the follow-up into the sidenetting.

However, Inter broke the deadlock 10 minutes later when Alessandro Bastoni whipped in a cross from the left and Mkhitaryan headed in at the far post.

Inter doubled its lead three minutes from the break with a flowing team move. Dimarco ran onto Nicolo Barella’s crossfield pass into the penalty area and dinked it across for an unmarked Dzeko to tap in from three yards out for one of his simplest goals.

Mkhitaryan almost doubled his tally early in the second half but his scorcher from distance came off the right post.

Dzeko did get a second in the 66th, driving into the bottom left corner after Lautaro Martinez had squared the ball across to him

It was Dzeko’s 12th goal against Plzen in 10 matches, and 11th in the last six.

Dzeko was given a standing ovation when he went off but there was even more of a resounding reaction shortly afterwards, when Lukaku was brought on with seven minutes remaining.

However, the loudest cheer from a packed San Siro came four minutes later as the Belgian forward tucked the ball into the back of the net.

”I never saw a team which behaved like this with a teammate,” Inter goalkeeper Andre Onana said. ”We were all waiting for him and and we are so happy he scored.

”He showed how important he is for us, we are very happy for him.”

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