PARIS — It was late in the summer of 2016, the Rio Olympics were over and Brazilian midfielder Formiga was ready to retire. This made sense, given that she was 38 years old, ancient by soccer standards, and that she had played in (among other things) six Women’s World Cups and six Olympic Games.

“I wanted to leave space for some new players,” Formiga said this spring in an interview at the training ground of Paris St.-Germain, the club she joined last year and for which she is captain.

[Sign up for Rory Smith’s weekly newsletter on world soccer: Rory Smith on Soccer.]

But then Vadão, coach of the Brazil women’s national soccer team, asked her to reconsider, and Formiga thought some more about it. She thought about how she was still playing at peak performance, even after nearly 25 years in the game. She thought about the two-steps-forward-one-step-back state of women’s soccer, and the precarious state of women’s rights, in general, back home in Brazil.

And so she agreed to return one last time, for what is her seventh and (almost certainly) final World Cup. At 41, Formiga became the oldest woman to compete in the women’s tournament when she started Brazil’s opening match against Jamaica, and the second-oldest non-goalkeeper to play in either the men’s or women’s tournament. (Roger Milla, a forward, played for Cameroon in 1994, when he was 42. Several men’s goalkeepers have played into their 40s, as did the American defender Christie Rampone, who turned 40 at the 2015 Women’s World Cup.) She started Brazil’s second game as well, but will miss their third after receiving her second yellow card of the tournament in the 3-2 loss to Australia on Thursday.