The costliest Olympics ever are closing in Sochi with a spectacular show and Russia proudly installed atop the medals table.

Fireworks and a countdown kicked off the closing ceremony in the Fisht Olympic Stadium, packed with spectators who chanted "Ro-ssi-ya! Ro-ssi-ya!" — "Russia! Russia!" —and were in a party mood after the high-security games passed off safely without feared terror attacks.

The Winter Games now move to South Korea's Pyeongchang in 2018.

Giant screens flashed up highlights from the 17-day games. With a 3-0 victory over Sweden in the men's hockey final Sunday, Canada claimed the last gold from the 98 medal events.

Later in the ceremony, the Olympic flame will be extinguished and Thomas Bach will assess the games, his first as International Olympic Committee president.

More From ESPN Western Colorado