Germany will take on former Olympic champions Croatia for the gold medal in the men's handball final on Sunday.
The Germans, who last won an Olympic gold medal in Moscow in 1980, upset defending Olympic champions Russia 21-15 in their semi-final on Friday.
Earlier, Croatia, who failed to qualify for the last Games, beat Hungary 33-31.
In the women's competition, Denmark beat Ukraine 29-20 and in Sunday's final will take on South Korea, who ousted world champions France 32-31.
High-scoring left-winger Stefan Kretzschmar scored five goals from 10 shots and
right-winger Florian Kehrmann grabbed four from eight attempts to lead the German men's attack.
The European champions trailled 10-9 at half-time but dominated after the break,
restricting the Russians to five goals.
Croatia's win was spearheaded by Spanish-based attackers, Ivano Balic with a game-high nine goals from 14 shots and right-winger Mirza Dzomba with eight goals from 10 attempts.
The Croatians led 18-16 at the changeover but goalkeeper Vlado Sola was forced to keep Hungary at bay with several tough saves in the second half.
In the women's semis, Korea opened a 30-23 lead but the French responded with five straight goals before the Koreans rallied to claim victory.
The Danes, seeking a hat-trick of Olympic titles, were never in trouble in their win over Ukraine