The United States came from 16 points down to avoid one of the biggest shocks in basketball history in a dramatic 101-100 victory over South Sudan in London.
South Sudan led 58-42 in the second quarter before taking a 14-point lead into the break in an Olympics warm-up game at the O2 Arena.
The USA went on a 16-0 run to end the third quarter with a five-point lead but South Sudan battled back to go one point ahead with 20 seconds remaining.
LeBron James hit a crucial lay-up to put his side ahead by one point with eight seconds to go, and South Sudan could not hit a late winner.
The USA are targeting a fifth consecutive men's basketball gold medal at this summer's Olympics in Paris, while South Sudan, ranked 33rd in the world, will play in their first Games.
The 12-man USA roster is filled with some of the NBA's greatest talents, while only four of the South Sudan team have played an NBA game.
But they outplayed the world number one side in the first half, hitting 61% of their shots, while the USA only made one three-pointer.
Marial Shayok scored a game-high 25 points for South Sudan and Charlotte Hornets forward JT Thor hit a three-pointer to put his side 100-99 ahead late on.
But the USA were indebted to James, who capped a fine second-half showing with the game-winner to finish with 23 points.
The United States have won all four of their pre-Olympic exhibition games, with their final warm-up coming against Germany at the O2 on Monday.
"That was better than the blowouts, at least we got tested - I like getting tested baby," said two-time Olympic champion James, 39.
The USA and South Sudan will face each other in Group C of the 2024 Olympics on 31 July.
"The match was super important because we feel like we can’t be beaten and they showed us we can be beat," said USA guard Anthony Edwards.
"We have to come ready to play."


Iran says closed Strait of Hormuz as US deal hits obstacle ahead of Swiss talks
World Cup 2026: Brobbey, Gakpo score braces as rampant Netherlands crush Sweden
'What power do you have to collapse NPP you did not build?' – Awal Mohammed jabs...
Chaos at Central University as vendors demand refunds after SRC Week cancellatio...
GMet issues severe weather alert for Northern Ghana as heavy rainstorm approache...
Ken Ofori-Atta is the first Ghanaian minister to use sickness to flee from accou...
Family demands justice for 14-year-old girl allegedly raped, killed in Binaba
Trump cuts HIV funding to South Africa
88 dilapidated buildings marked for demolition in Sekondi-Takoradi
Police crack suspected robbery network in Ashanti South, two suspects killed in ...