At the 2018 World Cup in Russia, Shaqiri scored a last-second goal to defeat Serbia, and he celebrated by forming the shape of an eagle with his hands to show his support for Kosovo, his native nation and a former Serbian province that gained independence in 2008. Serbia does not recognise that independence.
The Chicago Fire player received constant jeers and boos, and at least one Serbia supporter was kicked out for yelling anti-Kosovo slogans.
Shaqiri scored the game's first goal as Switzerland, who entered the match assuming a draw would probably be sufficient, advanced from Group G with a thrilling 3-2 victory, joining Brazil despite their unexpected 1-0 loss to Cameroon.
Granit Xhaka's partially blocked shot that fell beautifully for Breel Embolo in the opening seconds of the game almost gave Switzerland the lead, but Serbian goalkeeper Vanja Milinkovic-Savic made a good stop before parrying Xhaka's follow-up.
Serbia's Andrija Zivkovic responded by hitting the post from 20 yards out, but Murat Yakin's team had earned the lead at that point.
Ricardo Rodriguez's left-wing cross was recovered by Djibril Sow, who pushed it into the path of Xherdan Shaqiri. Shaqiri scored after a deflection off Strahinja Pavlovic and ran off to celebrate by putting his finger to his lips in front of the crowd.
Six minutes later, Aleksandar Mitrovic wonderfully directed Dusan Tadic's left-wing cross past Gregor Kobel to give Serbia an excellent response.
Following a clear-cut chance for Shaqiri to score, Tadic once again showed his talent by finding Vlahovic, who turned deftly and beat Kobel despite Remo Freuler almost stripping the Juventus striker of the ball.
Embolo converted Silvan Widmer's cross at the far post to make it the first time both teams had scored at least twice in a World Cup game before halftime since England v. Argentina in 1998. It was Switzerland's turn to dig deep, and they did so admirably.
Within the first three minutes of the second half, Switzerland finished the turnaround. Shaqiri chipped the ball into the path of Ruben Vargas, who skillfully flicked it for Freuler to finish.
As Serbia realised their time in Qatar was coming to an end, tempers flared. Predrag Rajkovic, the substitute goalkeeper, received a booking for encroaching onto the field to confront the referee. Meanwhile, a public address announcement urged Serbian supporters to stop using racial chants and gestures.
Deep into stoppage time, a final altercation between Nikola Milenkovic and Granit Xhaka and several players looking to get involved occurred. Both Milenkovic and Xhaka, a second man with Albanian ancestry connected to Kosovo, were detained.
What does it mean? Ronaldo and Portugal await
While Switzerland go on to a meeting with Portugal and Cristiano Ronaldo on Tuesday, Serbia will head home.
On the balance of play it was the right outcome. Switzerland wobbled towards the end of the first half but, for the most part, played with a composure that Serbia lacked.
Shaqiri joins illustrious duo
Shaqiri may be the man the Serbian fans love to hate but he showed his endearing quality once more with Switzerland's opening goal.
It meant he became just one of three players to score at each of the last three World Cup tournaments. The other two? Cristiano Ronaldo and Lionel Messi.
Evergreen Tadic shows his class
Tadic may be 34 but he remains Serbia's creative hub. He supplied the opener with a delicious cross from the left and was also instrumental in the second, although Freuler should have done better with his attempted clearance.
Whether he continues to play international football remains to be seen but he will leave a sizeable hole should he opt to stand down.
Switzerland finish as runners-up to Brazil in Group G, and go on to face Portugal in four days' time.
Serbia go home having taken just one point from their three games, against Cameroon.