Germany secured the bronze medal in the women's Olympic football tournament with a 1-0 win over world champions Spain, thanks to a Giulia Gwinn penalty.
Gwinn gave her side the lead in the 65th minute after converting a penalty following a foul by Spanish keeper Cata Coll.
Spain's Alexia Putellas squandered a chance to send the match to extra time as her penalty was saved by goalkeeper Ann-Katrin Berger in the final seconds of the match.
Brazil will take on the US in Saturday's gold medal match.
In women's hockey, Argentina beat Belgium 3-1 on penalties to win the bronze medal after a 2-2 draw in regulation time as forward Sofia Cairo scored on the pivotal final shot following goalkeeper Cristina Cosentino's two blocks.
It was Argentina's third bronze and sixth Olympic medal in women's hockey, their second medal in a row after receiving silver in Tokyo. Belgium will have to wait another four years to try to get their first Olympic women's medal in the event.

Quick and effective: Sabalenka races into French Open second round
Miami says Lionel Messi dealing with ‘overload,’ fatigue in hamstring
French showman Monfils bids adieu to Roland Garros after loss to Gaston
Injury rules Spurs' Kudus out of Ghana's World Cup squad
Iran to commute to World Cup games from Mexico after US refusal
