BAKU, Azerbaijan (AP) — A lifeline for Switzerland. More misery for Turkey.

Xherdan Shaqiri scored two goals Sunday to give Switzerland a 3-1 victory over Turkey and a likely place in the round of 16 at the European Championship.

Winger Steven Zuber assisted all three Switzerland goals, with Haris Seferovic getting the first and Shaqiri putting in the next two.

Irfan Can Kahveci scored for Turkey, the only goal the team managed at Euro 2020.

“We reacted after the defeat with Italy," Shaqiri said, referring to the 3-0 loss in Rome on Wednesday. “We played like a unit and that was crucial today against this team. We knew that if we’re good, we’re going to create a lot of chances today against this team and we did.”

Switzerland finished third in Group A and will likely qualify as one of the four best third-place teams. The Swiss will have to wait until other groups are finished for confirmation.

If Switzerland had scored two more goals, it would have overtaken Wales for second place in Group A and a guaranteed spot in the next round. The Welsh lost to Italy 1-0 in Rome.

“I’m a bit disappointed with the goal we conceded. This is the only thing that I can say I’m not happy (about),” Shaqiri said. “We could score maybe one or two more goals for sure but at the end of the day it’s important to win the game and we did that.”

Boos echoed around the stadium at the end of the match as Turkey exited after losing all three of its games. The team's goal difference was minus-7, the worst since the European Championship expanded to a 24-team competition in 2016.

Seferovic put Switzerland ahead in the sixth minute and hushed what had briefly been a raucous crowd. Under pressure from the Swiss defense, Zuber turned and played a pass for Seferovic, who placed his shot low into the far bottom corner from the edge of the box.

Zuber had a hand in Shaqiri's second goal as well in the 26th. Seferovic drew the Swiss defense to the left side of the box and played in Zuber, who found Shaqiri in the space created. The Liverpool winger had time to control the ball and curl it into the top-right corner, leaving the goalkeeper no chance.

Kahveci got Turkey back into the game with his own spectacular curled shot in the 62nd — and was immediately substituted.

That woke up the pro-Turkey crowd in Baku, but Shaqiri soon broke away on a counterattack to restore the two-goal lead off Zuber's third assist.

Swiss keeper Yann Sommer kept his team in front with four big saves in the first half, three off shots from fullback Mert Müldür. Sommer was playing two days after he rejoined the team following a trip to Germany for the birth of his second child.

Müldür, one of three changes made to the lineup by coach Şenol Güneş, was Turkey’s main attacking threat for much of the game as lone striker Burak Yilmaz missed chances and failed to connect with passes.

Shortly before halftime, Müldür ran the length of the field from his own penalty area, beating three Swiss players on the way, but his shot was stopped by Sommer again.

Granit Xhaka came closest to extending Switzerland's lead when he blasted a free kick off the post in the 77th.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports