On Sunday night, 48 hours before she would make her 316th and final appearance for the U.S. women’s national soccer team, Carli Lloyd and some teammates attended a Rolling Stones concert in Minneapolis.

At 39, Lloyd is half Mick Jagger’s age, a gap that, while she marveled at the frontman, got her thinking.

“They sort of make me feel like I should keep playing,” she said Monday. “Mick running down the stage at age 78 and performing the way he did was pretty incredible.”

It was intended to be a joke, but given her longevity and work ethic, the relentless pursuit of perfection that she said left her “misunderstood” by the public and those around her, there was a trace of seriousness as her Tuesday farewell against South Korea in St. Paul, Minn., neared.

What, after all, was preventing an unlimited career, like a rock-and-roll legend or an evergreen quarterback in Tampa? Consider: Lloyd is among 17 female soccer players to score 100 or more international goals; since turning 30, she has scored 98 of her 134. This year she posted a team-high 11 in 22 matches.

In her farewell Tuesday, Lloyd left to a rousing ovation in the 66th minute of a 6-0 victory. She had a few chances but didn’t score. Before yielding to Alex Morgan, she removed her shoes, hugged teammates and removed her jersey, revealing a second shirt with her married name, “Hollins,” on the back.

Vlatko Andonovski, the last of Lloyd’s five national team head coaches, said her high level of excellence has showed “age is just a number.”

With age also comes perspective, and after global travels and an insatiable dedication to her craft, Lloyd recognized she was missing out on life beyond the pitch. She wants to have a child with her husband, Brian. She wants to continue rebuilding a relationship with her parents and siblings that, until the coronavirus pandemic, had been fractured for 12 years.

Essentially, she wants to see the Rolling Stones without having to worry about the next morning’s workout.

So, no, she is not second-guessing her decision in August to retire from international soccer after 16 years and some of the greatest performances in program history. (She will continue playing for Gotham FC in the National Women’s Soccer League until the season ends next month.)

“Throughout my career, I have just wanted to be the best soccer player I could be,” she said. “I have often missed out on going to do things for fun. I am not missing out on anything now.”

Lloyd ended her U.S. career second in appearances behind Kristine Lilly (354), third in goals behind Abby Wambach (184) and Mia Hamm (158), and fifth in assists (64). She won two World Cups and two Olympic gold medals.

She was the 2015 FIFA player of the year after recording the first hat trick in a World Cup final since England’s Geoff Hurst in 1966. (It took her 16 minutes.)

Lloyd’s endurance, Andonovski said, has sent a message to U.S. players of all ages that, “Oh, we have a lot more years in us.”

“It’s not just two or three now,” he said. “She extended the life span of professional athletes.”

Quality matched quantity. The U.S. program’s Mount Rushmore would include, first and foremost, Hamm and Wambach. The last two slots? Strong cases would be made for Lloyd, Lilly, Michelle Akers, Hope Solo and Megan Rapinoe.

“If she was a male soccer player in Europe, we would have statues of Carli Lloyd all over the country,” said Andonovski, a native of North Macedonia. “Streets would be named after her — complexes, stadiums, everything.”

Lloyd did not take a traditional path to stardom. She is from South Jersey, not Southern California. She played at Rutgers, not an NCAA superpower such as North Carolina or Stanford.

Her first senior training camp came in 2004 as one of a few under-21 team members invited to work out with a Hamm-led squad preparing for the Olympics in Athens.

Lloyd called it “a pretty big wake-up call.”

“I remember playing five versus five, which are often bloodbaths with these teams,” she said. “The standard was just so high, the demands.”

Goalkeeper Briana Scurry was screaming at her to get back on defense, at a time when “I didn’t really defend,” Lloyd said. Hamm was adamant about where she wanted the ball played to her feet.

“It was an eye-opener,” Lloyd said. “I knew I had a long way to go and this was the best of the best. It’s a weird thing. You put all your chips in, you take a risk, you do all this for the unknown, not knowing how many years you are going to have with this team, not knowing if you’re going to make World Cup and Olympic teams.”

She went on to make four apiece and has appeared in more matches in those major tournaments than anyone else in program history.

Lloyd debuted with the senior squad in 2005 and broke her wrist in her second appearance. She remained in the match; postgame X-rays revealed the severity.

Along her career’s path, Lloyd was known for her obsessive pursuit of perfection, letting no one stand in her way, including family.

“Sure, there were times where maybe my focus was too intense,” she said.

She spoke her mind. She was close friends with Solo, the brilliant but belligerent goalkeeper. She kept a perpetual chip on her shoulder.

“I don’t think there [are] many who understand what it actually takes,” she said. “It’s a lot. It’s very tiring to continue to prove people wrong.”

Instead of expressing unbridled joy after the 2019 World Cup final in France, she grumbled about playing time in the tournament.

Her mind-set rubbed some the wrong way.

“I know I’ve probably been misunderstood throughout the years by teammates, coaches, fans and just about everybody,” she said. “But I’ve just tried to be my most authentic self — truthful, honest, raw.”

Andonovski experienced her fixation shortly after being named head coach in late 2019. Lloyd asked if he would be okay with her training on her own outside of team practices. She planned, Andonovski said, to check Google Maps for nearby parks to use.

No matter how he responded, Andonovski knew Lloyd was going to do it anyway. To avoid turning an ankle on a rutty path, he told her to use the team’s facilities.

“In my mind, I might as well be the nice guy,” Andonovski said, laughing. So he told her of course, he supported her. “It kicked off a good relationship,” he said.

Lloyd said she will find new ways to channel her energy. There are sure to be regular trips to the links; her husband is a golf pro.

Soccer, she maintained, will remain a big part of her life, though not on the field.

“I don’t think that love and passion will just go away,” she said. “I don’t think anything can fill what this journey has been all about, and that’s okay. … I can’t leave the game altogether. This is a goodbye on the field, but this is not a goodbye for me in the soccer world. I want to continue help grow the game.”

Read more from The Post: