DONGGUAN, China — The United States came to China looking to again be the best basketball team in the world.

It will go home with the worst tournament showing in program history.

Such is the reality for the Americans now, assured of finishing no better than seventh at the FIBA World Cup after falling to Serbia, 94-89, in a consolation game on Thursday. The previous worst finish for a United States men’s team in 45 tournament appearances was sixth at the 2002 world championships.

“We’ve committed to this from Day 1,” United States guard Joe Harris said. “To get all the way to this point and just kind of have it abruptly come up short, it really stings.”

The Americans — the top-ranked team in the world — will be seventh or eighth in China, depending on the outcome of their consolation finale Saturday. Harrison Barnes scored 22 for the United States, which got 18 from Kemba Walker and 16 from Khris Middleton.