Marta overtook Miroslav Klose to become the World Cup's new all-time leading goalscorer as Brazil beat Italy 1-0 to reach the last 16, with a Sam Kerr-inspired Australia also progressing after they crushed Jamaica 4-1.
Group C winners Italy had already confirmed their spot in the next round, and although they kept things tight, Brazil just about did enough to earn the crucial three points, taking them through in third place.
Brazil were made to work hard for the victory and only got the decisive goal 16 minutes from time, when Marta converted a penalty after Debinha had been fouled in the box.
That took Marta's tally to 17 World Cup goals, one more than Klose managed during his career with Germany.
Australia made significantly lighter work of Jamaica, however, beating them comprehensively to qualify in second, ahead of Brazil on goals scored.
Kerr put Australia ahead with a looping header after 11 minutes, before doubling her tally just prior to the break when she nodded in unmarked.
Jamaica pulled one back with their first World Cup goal as Havana Solaun slotted home.
But Kerr was in an unstoppable mood, completing her hat-trick with a clinical finish after a fortunate ricochet in the area and she got a fourth late on, pouncing on goalkeeper Nicole McClure's heavy touch to score.