Andressa Alves scored in the 44th minute as Brazil earned a spot in the knockout stage with a 1-0 win over Spain at the Women's World Cup in Montreal on Saturday.
The win is the eighth straight in group stage play for Brazil, which is unbeaten in 14 group matches since a loss to Germany in 1995.
Spain controlled the game for much of the first half, but Brazil closed the half with a flurry -- capped by Alves' second-effort goal after her first shot was cleared near the goal line.
Irene Paredes nearly equalized for Spain in stoppage time, but her shot off Brazilian goalkeeper Luciana bounced off the near post.
Brazil finishes group stage play against Costa Rica on Wednesday, while Spain faces South Korea.