Usain Bolt led Jamaica to victory in the sprint relay in Moscow to take his tally of World Championship gold medals to a record-equalling eight.
Bolt, 26, guided his team home in 37.36 seconds with the United States second and Great Britain originally in third.
But Britain lost their bronze after an appeal against their second changeover and Canada were promoted to third.
Bolt finished the championships with three golds after winning the 100m, 200m and the relay.
It is the second time he has secured the sprint triple in World Championships, matching the trebles he completed at the 2008 and 2012 Olympics.
Bolt joined Americans Michael Johnson, Allyson Felix and Carl Lewis with eight world titles and he is tied with the latter two on 10 medals overall.
The Jamaican can claim to be the most decorated athlete of all time in World Championships as he won two silvers to Lewis and Felix's silver and bronze medals.
"It is just great," Bolt said of the comparison. "I'll continue dominating. I'll continue to work hard. For me, my aim is to continue into the greatness thing."
The United States team gave the Jamaicans a scare but Rakieem Salaam's handover to Justin Gatlin left the individual 100m runner-up off balance.
He clearly strayed into the Jamaicans' lane outside him but somehow escaped disqualification.
It made no difference to Bolt, who streaked clear to complete victory in the sixth-fastest time ever.
"I wasn't really worried about Justin. I knew if he got the baton in front of me, I could catch him," Bolt said. "So it was just going out there to run as fast as possible."
Bolt delighted the crowd with a celebratory Cossack dance before parading round the track with his three medals on show.
The British quartet also celebrated wildly after finishing third but there were immediate concerns over whether James Ellington and Harry Aikines-Aryeetey had exchanged the baton within the rules.
Confirmation came through 30 minutes after the race that the handover had taken place outside of the legal area.
Jamaica also won the women's 4x100m relay to give Shelly-Ann Fraser-Pryce her third gold medal of the competition.
Carrie Russell, Kerron Stewart, Schillonie Calvert and Fraser-Pryce won in a championship record 41.29 seconds.
Britain were second at the final changeover but Hayley Jones was overhauled by France and the United States and finished in fourth place.
In other finals, Teddy Tamgho jumped 18.04m - becoming only the third man to clear 18 metres - to take gold in a high-quality triple jump competition which ended with Olympic champion Christian Taylor in fourth.
Kenya secured two golds with Asbel Kiprop retaining his 1500m crown and Kenya's Eunice Sum surging through to deny Russia's Mariya Savinova back-to-back 800m titles, while Germany's Christina Obergfoll, a two-time silver medallist, finally won javelin gold.
Russia finished top of the medal table with seven golds while the United States won six, although the Americans won 27 medals in total to the hosts' 17.
Jamaica also claimed six golds, Kenya five, Germany four and Ethiopia and Britain both on three.