Spain's Alex Abrines (C) is blocked by Latvia's Andrejs Grazulis (R) and Davis Bertans during the FIBA Basketball World Cup group L match between Spain and Latvia at Indonesia Arena in Jakarta on September 1, 2023. Photo: AFP
Italy, Brazil and Puerto Rico shook things up with upset wins over previously unbeaten Serbia, Canada and the Dominican Republic.
Tournament debutants Latvia pulled off an almighty shock when they beat Tokyo Olympic silver-medallists France in the group stage.
They added world and European champions Spain to their giant-killing conquests after scrapping to a 74-69 win in Jakarta.
Latvia head coach Luca Banchi said his team arrived at the tournament in the Philippines, Indonesia and Japan desperate to "prove that we belong at this level".
"Being an underdog in such a tough group, and suffering so many injuries before arriving and during the competition, for sure put us in a position where we don't have anything to lose," he said.
"We arrive here with real desire to prove our style, good or bad. Without any credit, it makes an extra strength."
Latvia looked to be heading for defeat when Spain took a 58-47 lead into the fourth quarter but they outscored the previously unbeaten defending champions 27-11 in the final period.
Power forward Davis Bertans led Latvia in scoring with 16 points but he said the team's performance was all that counted.
"I really don't care about any of the numbers on the stat sheet," he said.
"I know that every single guy gives 100 percent and more, every time they step out on the court."
Elsewhere in Group L, Brazil beat previously unbeaten Canada 69-65 to leave all four teams on three wins going into the final day's play.
Slovenia advanced to the quarter-finals with a 91-80 win over Australia that eliminated the Boomers from title contention.
Luka Doncic got into foul trouble but still scored 19 points to give Slovenia a measure of revenge after losing to Australia in the bronze-medal game at the Tokyo Olympics two years ago.
"It was a very hard game," said the Dallas Mavericks superstar.
"Australia had to win no matter what and we went into the game like we had to win no matter what.
"They have a great team, great players, but I'm really proud of how we played today."
Australia had already clinched a qualifying spot at next year's Paris Olympics as the highest-placed Oceania team at the World Cup.
Head coach Brian Goorjian immediately turned his thoughts towards the Games and said he was "excited at where this thing could go".
"It starts now, preparation for the Olympics," he said.
"We learned a lot and I think we're in the process of change in style of play, both offensively and defensively."
Germany also advanced to the quarter-finals from Group K along with Slovenia with a 100-73 win over Georgia.
The United States survived their first real scare of the tournament, beating Montenegro 85-73 in Manila.
Star shooting guard Anthony Edwards scored no points in the first half as a Montenegro team led by Chicago Bulls centre Nikola Vucevic gave the US as good as they got.
The Americans eventually stamped their authority on the game -- with Edwards scoring 17 points -- and head coach Steve Kerr said "it wasn't pretty but we just kept competing".
"You definitely get better with a game like this rather than a 40-point victory, because you have to feel it," he said.
"You have to go through an experience where it's a tight game and every possession matters. That's where you improve."
Lithuania beat Greece 92-67 later in the day to send both themselves and the US through to the quarter-finals.
In Group I, Puerto Rico beat the Dominican Republic 102-97, and Italy beat Serbia 78-76.
All four teams now have four wins going into the final games of the second round.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)