RIO DE JANEIRO — Brazil beat the Americans in the women’s beach volleyball semifinals Tuesday night and ended the gold medal run of three-time Olympic champion Kerri Walsh Jennings.

Agatha and Barbara won 22-20, 21-18 to earn a matchup in the final against Germany. The best Walsh Jennings and her partner, April Ross, can do is a bronze medal when they play Brazil’s other women’s team on Wednesday.

Brazilian men’s team Alison and Bruno also advanced to the gold medal game by beating the Netherlands earlier Tuesday. Italy defeated Russian in the other men’s semifinal. The men’s final is Thursday.

Walsh Jennings had won three gold medals with Misty May-Treanor and had never lost an Olympic match. In fact, she had only lost two sets in her Olympic career before falling in straight sets at the Copacabana venue.

“Kerri does so much for us and I didn’t step up today,” Ross said. “I’m very upset with myself.”

Agatha and Barbara are the defending world champions, but they were the second-seeded team in the tournament to fellow Brazilians Talita and Larissa, a pair of three-time Olympians, who lost to Germany earlier Tuesday.

advertisement | advertise on newsday

With the 21-18, 21-12 victory, Laura Ludwig and Kira Walkenhorst clinched Germany’s first-ever Olympic medal in women’s beach volleyball.

“I think it will take some time to realize what we did here,” Ludwig said. “We had some tough times, and now we’re in the final!”

The German men won the gold medal in London. But to match the feat in Rio, the women will have to beat the defending world champions.

Brazil still has a chance to match its 2004 Olympic haul of three medals. Despite failing to make the final, Talita said she would never forget playing in front of the hometown crowd on the iconic beach.

“I am so proud of my people, the Brazilian people,” Talita said.