USWNT beats Germany to clinch Olympic quarterfinal spot

The United States women rolled to a 4-1 win over Germany in Olympic soccer on Sunday in Group B, assuring they will have a spot in the quarterfinals after two wins from two games.

The U.S. attack was dominant in the first half in Marseille, with Sophia Smith scoring twice and Mallory Swanson tapping home the rebound from a stellar strike from Smith for the Americans' third goal of the half, while Germany briefly levelled the score on a long-distance shot by  Giulia Gwinn.

The Americans are playing their first major tournament under new coach Emma Hayes, who took over the U.S. team in late May.

Hayes is tasked with leading the Americans as they seek to distance themselves from the disappointment of last summer's Women's World Cup, when they crashed out in the round of 16.

The USWNT is the winningest team in the Olympics, with four gold medals. The Americans won the bronze medal at the Tokyo Games under former coach Vlatko Andonovski, who resigned following the World Cup.

Smith started for the United States after leaving the opener in the first half with what appeared to be an ankle injury.

Ten minutes into the match, Smith struck a cross from Trinity Rodman that sailed past German goalkeeper Katrin-Ann Berger.

Gwinn equalized in the 22nd minute with a low, bouncing shot from well outside the penalty area that eluded diving U.S. goalkeeper Alyssa Naeher.

Swanson put the United States back in front in the 26th. Berger punched out an attempt from distance by Smith, but Swanson picked up the rebound for a goal. It was Swanson's third goal of the Olympics.

Swanson is the second player to score three goals in the group at an Olympics, joining Abby Wambach in 2012.

Smith scored her second in the 44th minute on a high-arcing shot that hit the far post and caromed into the goal.

Lynn Williams, a substitute, added the final goal in the 89th minute and fans chanted "USA! USA!" as time ran down.

U.S. defender Tierna Davidson left the match with an injury and was replaced by Emily Sonnett.

Alexandra Popp left in the 76th minute with what appeared to be a right leg injury. It was a blow to Germany, which was already playing without midfielder Lena Oberdorf (knee).

The United States plays Australia in Marseille to conclude group play and can top the group with a draw or a win. Germany, which defeated Australia in its Olympic opener 3-0, plays Zambia in Saint-Etienne.

Information from The Associated Press was used in this report.