Defending champions United States reached the women's Olympic 4x100m relay final at the second attempt after dropping the baton in their heat.
The Americans ran on their own in the Olympic Stadium after successfully arguing they were obstructed in the first race earlier on Thursday.
They ran 41.77 seconds to beat the time set by eighth-fastest China.
Britain were second (41.93) in their heat behind Jamaica (41.79) to progress to the final at 02:15 BST on Saturday.
The US initially appeared to be out when the baton went flying as Allyson Felix attempted to hand it on to English Gardner on the second changeover.
However, television replays showed that Felix had been knocked off balance by Brazilian runner Kauiza Venancio as she prepared to hand over to Gardner - leading to the USA's subsequent appeal and reprieve.
China, the slowest qualifiers for the final, put in a protest over the decision but that was rejected before USA's solo run.
"I think I got propelled at about 20 miles an hour," said Felix. "When a foreign object comes in front of you, it's going to mess up the momentum and the handover."
There was another shock in the women's event as Dafne Schippers made a changeover error, leading to the Dutch - the European champions - going out in the heat.
The US men qualified fastest (37.65) while Jamaica, without Usain Bolt for the heat, were fifth fastest and GB seventh.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.