Andressa Alves was on target as Brazil edged Spain 1-0 to book their spot in the Women's World Cup last 16 on Saturday.
Alves struck a minute before half-time, pouncing on a defensive error to inspire Brazil to back-to-back wins in Group E.
The 2007 champions top the standings with a perfect record heading their final group match and will become the only country to win its group at the last five World Cups after Costa Rica and South Korea played out a dramatic 2-2 draw.
Karla Villalobos netted an 89th-minute equaliser for Costa Rica, who appeared destined for defeat.
First-half goals from Ji So-yun and Jeon Ga-eul cancelled out Melissa Herrera's 17th-minute opener, before Villalobos denied South Korea.
Costa Rica are second with two points from as many matches, while Korea and Spain both have a point apiece.
Meanwhile, it was an historic day for Colombia, who recorded their first World Cup victory via a shock 2-0 win over France.
Lady Andrade and Catalina Usme were the heroes for Colombia.
Colombia's stunning victory saw team leapfrog France atop of Group F, going one point clear of England.
England accounted for Mexico 2-1 after a scoreless first half.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.