Switzerland advanced to the knockout stage of the World Cup despite allowing a late lead to slip away in a 2-2 draw with Costa Rica in their Group E finale.
Josip Drmic thought he'd scored the winner for Switzerland in the 88th minute, but the Central American side were able to earn a point after a penalty in stoppage time.
Prematch attention had focused on Granit Xhaka and Xherdan Shaqiri's politicised "Albanian eagle" celebrations in Switzerland's last game, and Costa Rica being the only team without a tournament goal.
But this time, the Swiss kept their focus purely on their game and Costa Rica, who had already been eliminated, were able to leave Russia with a modicum of consolation.
The Swiss withstood a furious assault from Costa Rica at the start of the game with goalkeeper Yann Sommer making at least three huge saves to prevent Costa Rica, who also rattled the crossbar, from scoring their first goal of the tournament.
Blerim Dzemaili put the Swiss ahead in the 31st minute, lashing home from the centre of the box after Breel Embolo headed a cross down into his path.
Costa Rica finally had a moment to celebrate when Kendall Waston headed home Joel Campbell's corner in the 56th minute, triggering mass celebrations as if they had won the trophy.
But the Swiss retook the lead late on when Drmic turned in a low cross from Denis Zakaria, who minutes later conceded a penalty for a push on Campbell.
Bryan Ruiz sent his spot kick off the crossbar, but it came back to strike Sommer in the back of the head and rolled over the line for an equalising own goal.
However, Brazil's win over Serbia in the other group game meant Switzerland would have been through even with a slim defeat, and the Swiss will advance to face Group F winners Sweden in the round of 16.
There was a sour note for the Swiss, however, when captain Stephan Lichtsteiner, who supplied the cross for their first goal, took a second yellow card, meaning he will miss the knockout clash on Tuesday in St Petersburg. Fellow defender Fabian Schaer will also miss out through a yellow-card suspension.
Information from Reuters was used in this report.