But the similarities between the two Balkan nations fell by the wayside, along with Serbia's tactical cohesion, when Swiss coach Vladimir Petkovic brought on fresh legs to stretch the game.
"You should never mix politics and football".
Head coach Mladen Krstajic is not expected to make major changes but he could hand winger Filip Kostic a start.
Xhaka struck the Swiss equalizer in the 52nd minute before Shaqiri scored a late victor when he broke free from the half-way line to slot past Serbian goalkeeper Vladimir Stojkovic. "That's not enough; we have to play better against Serbia", Petkovic said through an interpreter.
Shaqiri's runs down the wings were a constant threat to Serbia's defense, while the Swiss midfield recovered after a shaky start to dominate in the same way it did against Brazil in their first match.
Then Swiss midfielder Xherdan Shaqiri, who was born in Kosovo, scored the winning goal in the 90th minute of the game on a breakaway pass that led him charging down the field.
Aleksandar Mitrovic opened the scoring for Serbia in the fifth minute but Xhaka's superb long-range effort in the second half pulled Switzerland level.
Xhaka was born to Kosovan-Albanian parents and has a brother, Taulant, who represents the national team.More news: Supreme court rules states can collect sales tax from online retailers
In the tournament's first come-from-behind victory, Xhaka made it 1-1 in the 52nd minute with a powerful shot through a crowded penalty area. The Swiss will advance to the round of 16 if they beat Costa Rica on Wednesday in Nizhny Novgorod.
The win puts Switzerland in pole position to make it out of a tough Group E that contains five-times winners Brazil but they were pushed all the way by the Serbs.
Serbia almost had their second just before the half but Dusko Tosic's diving header from point-blank range skidded off his head to Nemanja Matic who couldn't react fast enough to finish the chance.
Lazio's highly rated Sergej Milinkovic-Savic fizzed a right-footed shot narrowly wide of Sommer's right post on 15 minutes, and Mitrovic nearly scored with a spectacular bicycle kick that went the same way minutes later. - Branislav Ivanovic broke Dejan Stankovic's record for appearances for Serbia in its opening match against Costa Rica - he now has 104 caps.
Mitrovic was a handful for Switzerland with his strong physical presence close to the goal.
Shaqiri scored a last-gasp victor against Serbia.