(BBC) – The British team of CJ Ujah, Harry Aikines-Aryeetey, Adam Gemili and Nethaneel Mitchell-Blake finished in 38.15 seconds, just ahead of China who registered 38.16.
GB are world champions in the event.
Brazil secured gold with a world-leading time of 38.05, with the United States second in 38.07.
Great Britain’s men’s 4x400m team finished fifth in their final, with Trinidad and Tobago taking a fine gold.
United States were dominating the race up until Trinidad’s Machel Cedenio produced a final-leg 44.41 split to take gold in just over three minutes.
The US finished second but were later disqualified for a lane infringement, leading Jamaica to be promoted to second in 3:01.57 and Belgium third.
GB’s women’s 4x400m quartet finished sixth as Poland claimed a surprise win in 3:27.49.
European champion Justyna Swiety-Ersetic outran America’s Courtney Okolo in the final 100m to secure gold, leaving the United States to settle for silver and Italy third.
Jamaica’s 4x200m women’s team – which included Olympic 100m gold medallists Shelly-Ann Fraser-Pryce and Elaine Thompson – finished third after a poor handover on the first leg.
France took gold in 1:32.16, with China second. United States finished third but they were later disqualified.