As Smith performed at Moscow's Luzhniki stadium, giant screens laid out on the pitch showed images of soccer players and the colours of the Croatian and French flags - the two teams who face each other in the final.
Singers Era Istrefi and Will Smith perform during the closing ceremony. Reuters
Smith was joined on stage by Nicky Jam, a US-born singer with Puerto Rican roots, and by Era Istrefi, a pop singer who describes herself as Albanian Kosovar. Both artists had featured with Smith on the "Live It Up" single.
Croatia President Kolinda Grabar-Kitarovic with President of France Emmanuel Macron alongside FIFA president Gianni Infantino before the match. Reuters
In the final sequence of the ceremony, Russian opera singer Aida Garifullina performed Russian folk song "Kalinka" accompanied by bagpipes, a children's choir, and a percussion section.
Will Smith, Era Istrefi and Nicky Jam during the closing ceremony before the match. Reuters
That section featured a guest performer: Brazilian soccer star and past World Cup winner Ronaldinho, who for a few bars of the song hammered out the rhythm on an African drum.
The performances were a prelude to France and Croatia's players taking to the pitch to begin their final match, in front of a packed crowd at the 80,000-seat stadium.