LISBON, Portugal (AP)Eintracht Frankfurt’s fortunes changed in a matter of minutes in the Champions League on Tuesday.

At one moment it was finishing last in its group, the next it was qualifying to the knockout stage.

Frankfurt scored two goals 10 minutes apart in the second half to come from behind to defeat Sporting Lisbon 2-1 and advance from the group stage in its first appearance in the European competition.

Kolo Muani scored the winner with an angled shot from inside the area in the 72nd minute. Arthur Gomes had put the hosts ahead in the 39th and Frankfurt equalized with a penalty kick converted by Daichi Kamada in the 62nd.

”Our first half wasn’t good,” Frankfurt coach Oliver Glasner said. ”I asked more of the lads and they just delivered.”

Sporting was leading Group D while it was winning at home, but it finished in third place to earn a spot in the Europa League playoffs. A draw would have been enough for it to advance regardless of other results.

”It’s a tough blow for us,” Sporting defender Sebastian Coates said. ”But we have to move on and keep working.”

The Portuguese side was trying to make it to the round of 16 of the Champions League for the second straight season. It was eliminated by Manchester City in the last 16 last season.

Sporting started the game one point behind Tottenham, which scored late to win 2-1 at Marseille and finish first in what had been a wide-open Group D entering the last round. Marseille ended in last place. A draw would have given the French club a spot in the Europa League playoffs at the expense of Sporting.

Frankfurt is making its Champions League debut this season thanks to its Europa League title last season.

Sporting was trying to become the third Portuguese club to advance to the last 16 this season, after Benfica and Porto had already secured their spots in the next round.

Sporting lost forward Nuno Santos because of an injury in the first half. Santos was in a preliminary 55-man squad for Portugal ahead of the Qatar World Cup.

Sporting’s 17-year-old midfielder Dario Essugo made his Champions League debut in the second half.

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