Goalkeeper Barbara saved the decisive penalty as hosts Brazil beat Australia 7-6 on penalties to move into the Olympic football semi-finals.
After a goalless draw, Australia had a penalty to win after Brazilian icon Marta missed her effort - but Barbara kept out Katrina Gorry's strike.
Alanna Kennedy then saw Barbara save her penalty to send Brazil into a semi-final with Sweden in Rio on Tuesday.
Canada will face Germany in the other last-four tie.
Sweden beat defending champions United States in their quarter-final.
Take part in our new Premier League Predictor game, which allows you to create leagues with friends.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.