Wang Shipeng hit a late three-pointer to give China a 78-77 World Championship win over Slovenia that put them into the last 16.
Yao Ming celebrates with Wang Shipeng in Sapporo
China had lost their first three games in Japan but, thanks to Wang and 36 points from NBA superstar Yao Ming, they sneaked into the knockout stages.
In doing so, they eliminated Puerto Rico, who lost to Italy 73-72.
The USA thrashed Senegal 103-58 to join Argentina, Spain and Greece as the teams with a 5-0 record.
Olympic champions Argentina rallied to beat defending world champions Serbia/Montenegro 83-79, while European champions Greece rallied to beat Turkey 76-69.
Meanwhile, Dirk Nowitzki saved Germany from the brink of defeat with 47 points as they outlasted Angola 108-103 in triple overtime.
But it was China's day, as a tearful Wang admitted: "My team-mates mobbed me after the buzzer.
"Yao Ming was the first one to hug me. I felt so happy."
Yao added: "We found the oasis. It was luck, courage and belief that got us through. Wang's shot was straight out of the NBA. It was amazing."
Argentina v New Zealand
Italy v Lithuania
Turkey v Slovenia
Spain v Serbia-Montenegro
Germany v Nigeria
United States v Australia
France v Angola
Greece v China