Brazil thrashed world champions Spain to set up a repeat of the 2008 Olympic women's football final against the United States in Paris on Saturday.
An Irene Paredes own goal set Brazil on their way, with Gabi Portilho scoring a second on the stroke of half-time to stun the side that many had tipped as favourites for the gold medal.
Adriana added a third for Brazil, who were still without their all-time leading scorer Marta, 38, after she was suspended following her dismissal in the Group C defeat to the Spaniards.
While Duda Sampaio headed into her own goal to give Spain hope, Kerolin raced clear in the first of 15 added minutes to score Brazil's fourth before Salma Paralluelo bundled in a late consolation.
Spain will now play Germany for the bronze medal in Lyon on Friday (14:00).
Brazil are now guaranteed to at least match their previous best showing in the competition, when they won the silver medal in 2004 and 2008 - on both occasions losing to the US.
Latest Stories
-
Story of My Life: Frimpomaa acknowledges God’s favour in new single
13 seconds -
Spotify celebrates Wizkid’s ‘Ojuelegba’ 10th anniversary
39 mins -
FBI probing threatening letters sent to election officials in six states
43 mins -
Boeing, union negotiators set to resume contract talks on Wednesday
51 mins -
Campari buys minority stake in whisky brands owner
1 hour -
Al-Qaeda-linked group says it was behind Mali attack
1 hour -
12 pregnant women die due to poor road conditions over 5 years, says Asampu Assemblyman
1 hour -
Facebook owner bans Russian state media networks
2 hours -
UBA launches ‘Tastes of Africa Culinary Challenge’ with $5,200 Prize Pool
2 hours -
Excitement builds as tickets for 2024 African Legends Night go on sale
2 hours -
Four children trapped in freezer in Namibia die
2 hours -
What will a US interest rate cut mean for me?
2 hours -
Marlboro owner sells UK inhaler firm over backlash
2 hours -
2 preferred bidders submitted to government for Saglemi Housing Project completion
3 hours -
Opoku-Gyamfi Boateng
3 hours