DONGGUAN, China — The US came to China looking to again be the best in the world.

It’ll 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 World Cup after falling to Serbia 94-89 in a consolation game Thursday night. The previous worst finish for a US men’s team in 45 tournament appearances was sixth at the 2002 world championships.

“We’ve committed to this from Day One,” US 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 US, which got 18 from Kemba Walker and 16 from Khris Middleton.

Bogdan Bogdanovic scored 28 for Serbia, which bolted to a 25-point lead and handed the US its second loss in two days. Vladimir Lucic scored 15 for Serbia, which will play for fifth place Saturday.

“It’s a really tough game to play against those guys,” Bogdanovic said. “I’m sure both teams were really upset after losing in the quarterfinals and we were just trying to make people happy.”

A Serbia-US game was widely expected to be one for gold this weekend. The prospects of that were hyped plenty going into the tournament — especially after Serbia coach Sasha Djordjevic called out the Americans in a television interview by saying “if we meet, may God help them.” But all that was on the line Thursday night were bragging rights and a few world ranking points.

“There’s no regrets from our group in terms of what we’ve given, what we’ve sacrificed, the commitment everyone’s made to be away from their families, away from their teams, away from their organizations,” Barnes said. “There’s no regrets.”

Serbia led 44-40 at the half, a margin that may suggest the first 20 minutes were of the back-and-forth variety.

They were not. Instead, it was just two really big runs, one by each team.

Serbia won the first quarter 32-7. The US won the second quarter 33-12. Serbia shot 64% in the first quarter and the US shot 19%; in the second quarter, it was the Americans shooting 72%, Serbia 31%, and it stayed relatively tight the rest of the way.

US coach Gregg Popovich lauded his team for making the comeback, basically 24 hours after seeing its medal hopes dashed by the quarterfinal loss to France.

“I can’t tell you how much I’ve been impressed the whole time with their character, their stick-to-itiveness and their persistence as they’re learning how to play together,” Popovich said. “Tonight was a great example of that.”