RIO DE JANEIRO (AP) — Faces buried in hands and tears falling, the Brazilian women's volleyball team lost to China in a five-set quarterfinal match on Tuesday.

It was another heartbreaking defeat for the home country only hours after the Brazilian women's soccer team fell in a penalty shootout to Sweden next door at the Maracana Stadium.

China rallied from losing the first set to stun the two time-defending champion Brazilians 15-13 in the decisive fifth.

As China celebrated the biggest upset yet and quieted a stunned crowd, Brazil captain Fabiana pulled her team together in a huddle. While Fabiana's kill saved one match point to make it 14-13 in the third, Brazil had a pair of costly service errors late.

Brazil had been the heavy favorite to face the United States in a potential gold-medal match after beating the Americans in the championship match in each of the past two Olympics.

Meanwhile, a young China team that had been far from steady at the Rio de Janeiro Olympics played its best, most consistent match yet.

For an American team that knows Japan so well, patience was an absolute must. Against the best defensive team in the world, balls are going to come back across the net.

Karch Kiraly's top-ranked Americans moved one step closer to its goal of capturing the program's first volleyball gold, defeating familiar opponent Japan in straight sets to reach the semifinals.

"Before we go into any match with Japan we have to know we need to have a lot of patience," outside hitter Kim Hill said.

The unbeaten U.S. (6-0) won 25-16, 25-23, 25-22 and has dropped just five sets all tournament. The Americans will face Serbia, a straight-set winner over Russia, in Thursday's semifinals at Maracanazinho arena.

"Our approach is the same every time, so that didn't even really feel like an Olympic quarterfinal match," Kiraly said. "That's good. We're just playing volleyball against Japan."

The U.S. has faced Japan more times than any other team since 1983. The Americans have won the last three meetings on the Olympic stage against Japan, opening the 2008 Beijing Games with a four-set victory and sweeping Japan in a match at the 1996 Atlanta Olympics.

"They have a lot of fight in them, so it took a lot of patience on our end, and regrouping and resetting," middle blocker Foluke Akinradewo said. "I was proud of the team we were able to get it out in three sets."

China will face the upstart Netherlands women, who beat South Korea in four sets. The Dutch are in their first Olympics in 20 years and went 4-1 in group play behind the Americans.

Japan, one of the top defensive teams in the world, had a 7-0 run in the third set before the Americans closed it out. Now, the U.S. is two wins from gold.

"I don't have any expectations. Others may have them, but I don't," said Kiraly, the only person to win gold as a player in beach and indoor volleyball and looking to become the first as a coach and player.

Serbia lost in four sets to the U.S. during pool play but pulled off a surprising five-set victory at last year's World Cup in Japan that forced the Americans to qualify for Rio in Lincoln, Nebraska, in January.

"The most important thing is to keep smiling on the court and stay relaxed, and anybody can be beaten," Serbia's Jovana Stevanovic said.