Fresh off of a repeat performance as World Cup champions, the U.S. women's national team finds itself in flux.

On Tuesday, Jill Ellis announced she was stepping down after more than five years as the team's head coach. Under Ellis, the United States won eight total tournaments, including two World Cups, and lost just seven games.

Meanwhile, U.S. Soccer is in the process of naming the team's new general manager, who will report to President Carlos Cordeiro and chief executive officer Dan Flynn. The GM, expected to be appointed soon, will lead the search for a new coach.

Ellis, the national team's third female coach, hopes it will be another woman.

"I think there are a lot of qualified females. You also hope by doing it people have trust a female can do this," she said. "People have seen it and people potentially want to aspire to coach, not just soccer but whatever sport. You really hope that is part of the legacy you leave behind."

Once named, the new coach will be taxed quickly with preparing the team for Olympic qualifying and next summer's Tokyo Games. Ellis said she'd be there for her successor: "I want whoever comes next to know that there will be that support."

Hanging over all of the immediate uncertainty is the legal dispute between the women's team and U.S. soccer. The players filed a federal lawsuit last March accusing the federation of gender discrimination in matters including pay.

The lawsuit capped a long-simmering dispute between the federation and the players, who claim they deserve to make as much as their counterparts on the men's national team.

The two sides have agreed to mediation now that the World Cup is over.

Ellis steps away after winning back-to-back titles in soccer's premier global tournament. Her contract was set to expire following the World Cup, and she said Tuesday she started to think months ago about leaving following the event in France.

She'll stay with the team through its five-game victory tour, which starts Saturday against Ireland at the Rose Bowl. After that, she'll serve as an ambassador for U.S. Soccer for at least a year.

Ellis said she wants to spend more time with her family.

"The timing of this is good. Not only on a personal level but also for the program in terms of preparing to start a new cycle," she said. "It's obviously been a fantastic run and fantastic ride. I'm going to enjoy these last few games."

The top-ranked U.S. team has been dominant throughout Ellis' tenure. The team went undefeated in the 2015 World Cup in Canada en route to a 5-2 victory over Japan in the title match. The United States gave up just three goals over the course of the tournament.

Earlier this month, the U.S. defeated the Netherlands 2-0 in Lyon, France, to claim its second straight championship — pulling off challenging knockout victories over No. 4 France and No. 3 England. The Americans never trailed at the tournament and set records with 26 goals and a 12-game World Cup winning streak dating to 2015. Ellis became the first coach to lead a team to two Women's World Cup titles.

But there were also moments of disappointment. The defending champions were knocked out in the quarterfinals in the 2016 Brazil Olympics by Sweden, the team's earliest departure ever in the tournament. Afterward, there was some grumbling behind the scenes as Ellis shifted players and experimented with tactics.

Overall, Ellis led the team in 127 matches with 102 wins. She coached the team for more games than any of her seven predecessors.

Ellis became head coach in 2014, promoted after taking over on an interim basis following the dismissal of Tom Sermanni. She also served as interim coach after Pia Sundhage resigned in 2012.

She was an assistant to both and was on the staff of the gold medal-winning teams at the Beijing and London Olympics. She also served as head coach at UCLA for 12 seasons.

"This is not a job that someone sits in for 10 years," Ellis said. "Change is good. A position like this should not be forever."

On the same day that Ellis announced her resignation, Sundhage was introduced as the new head coach of the Brazilian women's team. Asked about some of the changes she plans to implement, Sundhage said Brazil needs "an American mentality" and "Swedish organization" to win more.

Ellis hasn't decided on her next move. Her decision to leave wasn't entirely unexpected, although many thought she'd stay on through the Olympics.

"I just need to take a step back and take it all in and see what next intrigues me and piques my interest," she said.

The United States is set to play Portugal on Aug. 29 in Philadelphia, and on Sept. 3 in St. Paul, Minnesota. The final two matches of the victory tour, set for early October, have not yet been announced.

___

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports