The Boomers have survived two losses, the most recent against Greece on Friday, to advance out of the pool stage at the Paris Games.
The 77-71 loss to Giannis Antetokounmpo's side meant Australia was relying on the in-form Canadians beating Spain, which they managed despite a late rally from the European nation.
A shocking 28-12 second quarter saw Australia down as many as 19 points to Greece, a margin that would have meant a guaranteed early exit.
Even a 10-point loss would have left Australia needing Canada to win and then hope they were among two of the best third-placed sides to progress.
The Boomers did enough to avoid that hairy scenario though, Patty Mills (13 points) and Dyson Daniels (11 points, eight assists, six rebounds) hitting three pointers to cut the lead to two points in the final minutes.
Jock Landale continued his fine tournament with a 17-point, eight-rebound double-double while point guard Josh Giddey (nine points, 10 rebounds, six assists, five turnovers) struggled in the first half but finished strongly.
Antetokounmpo (20 points, seven rebounds, six assists) kept coming though and, crucially, had help.
Thomas Walkup (18 points) hit four-of-seven triples while Dinos Mitoglou and Vasilis Toliopoulos both scored 13 points.
Walkup's fourth three-pointer made it a seven point margin just as the Boomers looked set to run them down in the final 90 seconds.
Australia made just 10 of their 21 free throws, the loss coming after a defeat of Spain and loss to Canada in what's been dubbed the Olympics' group of death.