Though South Sudan has never competed in the Olympics in men’s basketball and its roster lacks a current NBA player, the African nation nearly turned in one of the biggest upsets in international basketball history Saturday against the United States.

With the Paris Olympics just days away, the Americans needed a late basket from LeBron James to hold off South Sudan, 101-100, during an exhibition at London’s O2 arena. The Americans, who are the odds-on favorites to win their fifth straight Olympic gold, were favored by 43½ points.

James hit a go-ahead layup driving to his left with eight seconds remaining, and South Sudan missed three shots to pull off a monumental upset in the closing seconds.

For the United States, the game exposed several issues that could prove problematic when it opens group-stage play against Serbia on July 28. The Americans fell behind by as many as 16 points in the first half as their starting lineup, featuring Joel Embiid at center, continued to struggle with slow starts and poor ball movement. South Sudan handily won the outside shooting battle, going 14 for 33 (42.4 percent) on three-pointers compared to the Americans’ 7-for-28 shooting (25 percent). And the Americans’ star-studded roster, led by James and Stephen Curry, continued to struggle with turnover issues.

Saturday’s exhibition was the fourth of five showcase games the Americans will play before in the Olympics. They beat Canada, Australia and Serbia in their first three contests, but their chemistry wasn’t always sharp as Coach Steve Kerr experimented with multiple starting lineups and unorthodox rotations.

Those problems continued Saturday until a quality third quarter that saw the Americans erase a 14-point halftime deficit and take a lead into the final period. But South Sudan rallied and had a 100-99 lead before James’s winning basket.

Carlik Jones, a former NBA player, led South Sudan by posting a triple-double with 15 points, 11 rebounds and 11 assists. James led the Americans with 23 points, six rebounds and six assists.