HARRISON, N.J. (AP)Mallory Pugh scored the go-ahead goal in the 56th minute and the U.S. women avoided a fourth straight loss with a 2-1 come-from-behind victory over Germany on Sunday.

Sophia Smith also scored for the top-ranked United States, which went into the match at Red Bull Stadium with its first three-game losing streak since 1993.

Germany defeated the United States 2-1 on Thursday in Fort Lauderdale, Florida. Paula Krumbiegel scored the decisive goal in the 89th minute for the third-ranked Germans.

That loss snapped a 71-game unbeaten streak for the United States on home soil, stretching back to a loss to Australia in July 2017.

The Americans also fell to England 2-1 at Wembley Stadium on Oct. 7, then lost 2-0 to Spain in Pamplona on Oct. 11.

Jule Brand took advantage of a disorganized U.S. defense with her goal in the 18th minute. It was the fourth straight game that the US had conceded the opening goal after scoring the first in the previous 21.

Smith, who won Most Valuable Player in the National Women’s Soccer League this season, scored the equalizer in the 54th minute before Pugh’s game-winner some two minutes later.

”I felt the whole game was they do something, we adjust, and we do something, they adjust. So it felt like a chess match and it was a great, great challenge for the players,” U.S. coach Vlatko Andonovski said.

Alex Morgan made her 200th appearance for the team, ranking her 13th all time on the team.

Germany was hurt when midfielder Lena Oberdorf had to leave the game in the first half with what appeared to be a shoulder injury.

”We had a good start to the game, the 30-plus minutes were really good. They were really present on the pitch and made good decisions, and then we had a cut when Lena was injures, which was hard for the team,” Germany coach Martina Voss-Tecklenburg said through a translator.

It was the final match of the year for both the Americans and Germans, who are preparing for next summer’s Women’s World Cup, co-hosted by Australia and New Zealand.

The United States has won the past two women’s World Cups and has four titles overall. Germany is the only other team to win multiple women’s World Cups, with titles in 2003 and 2007.

The United States has retooled its roster since its bronze-medal finish at the Tokyo Olympics in 2021. Head coach Vlatko Andonovski has brought in younger players, including Smith, 22 and Pugh, 24.

Smith has 11 goals for the United States this year and is the youngest player since Mia Hamm in 1993.

”They’re inspiring to watch play and they show that at the stage of the career they’re at, they’re ready to compete against some some of the best teams in the world,” Vlatko said about his young players. ”I thought that their performance was very good. And I think that they were a very good example for all those young players that were here.”

The Americans also have several players out with injuries, including forward Catarina Macario and midfielder Sam Mewis. Julie Ertz is on maternity leave.

The United States heads to New Zealand in January for training camp and a pair of exhibitions against the Kiwis on Jan. 18 and Jan. 21, both in stadiums where the Americans will play during the group stage of the World Cup.

AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP-Sports