It never unfolded this way in Ashley Wagner’s dreams, qualifying for the U.S. Olympic team on the heels of her most error-strewn performance in years, the tears fresh in her memory if not on her face.

But U.S. Figure Skating officials chose to look beyond Wagner’s two falls amid a nerve-seized free skate at the U.S. championships Saturday, in which she finished fourth, and named the West Potomac High School graduate to one of the three women’s spots on the Sochi-bound team.

The decision was made by a selection committee behind closed doors Sunday morning, announced at a noon news conference at Boston’s TD Garden and fell most bitterly on Mirai Nagasu, who had exulted just 12 hours earlier in a bronze-medal performance that under normal circumstances would have guaranteed her a spot on the Olympic team.

But in choosing its Olympic delegation, U.S. Figure Skating differs from the national governing bodies of many other sports, factoring in its athletes’ entire body of work over the previous year rather relying on than a single qualifying event. And it saved Wagner, 22, who has been the sport’s most reliable competitor since narrowly missing the 2010 Vancouver Games.

Having spent a sleepless night anguishing over the prospect of missing the Olympics by one spot for a second consecutive time, Wagner was sitting in the stands at TD Garden on Sunday morning, waiting to watch her best friend warm up for the men’s competition, when she got the text message alerting her she had been named to the Olympic team roughly 30 minutes before the news was made public.

She wept anew. And because she wasn’t supposed to tell anyone before the official announcement, she retreated to an obscure corner of the arena, dropped to her knees and sobbed without stinting.

“When I look back on my career, this one horrible performance isn’t what makes me the skater I am. That doesn’t define me,” Wagner said Sunday. U.S. Figure Skating “has given me the opportunity to go into the Olympics and make everybody forget about this performance, which I am fully prepared and very excited to do.”

In a statement released Sunday night, Nagasu voiced her disappointment in the decision but made clear she would not appeal. “Though I may not agree with it, I have to respect the decision the federation made,” she said. “And I’m grateful to everyone who has supported me and look forward to what comes next in my skating career.”

She returned to the ice at 8 p.m. for the post-competition exhibition that’s traditionally staged as the skaters’ gift to fans. Showered with applause and given two standing ovations, Nagasu wept at the start and finish of a lovely performance.

Explaining Sunday’s decision to legions of TV viewers who watched Nagasu outperform Wagner won’t be easy. But after shattering Nagasu’s dream of competing in Sochi while resurrecting Wagner’s, U.S. Figure Skating President Patricia St. Peter set about trying.

Officials look through a broader lens, St. Peter said, considering who has distinguished themselves in international competitions, who has developed a reputation among judges and who can withstand pressure. Past Olympic experience, which Nagasu boasts (she finished fourth in Vancouver), isn’t among the criteria.

Based on those factors, U.S. Figure Skating tapped 18-year-old Gracie Gold, who was as brilliant as her name in winning the 2014 U.S. championship; 15-year-old Polina Edmunds, a reed-like, triple-jumping phenom; and Wagner, a two-time U.S. champion (2012-13) who has won a medal in her last six international competitions.

“If you look at Ashley Wagner’s record and performance, she has got the top credentials of any of our female athletes,” St. Peter told a packed room of journalists. “She has delivered consistently over the past year.”

St. Peter’s point was unassailable, as is the fact Wagner is ranked fifth in the world — higher than any of her compatriots.

But the decision to skip over a freshly minted U.S. national medalist in naming the Olympic team was a departure from past practice, occurring just three times in the sport’s history.

Following the conclusion of the men’s championships, U.S. Figure Skating officials also named Jeremy Abbott, 28, who won his fourth U.S. national title Sunday, and 19-year-old Jason Brown, the U.S. silver medalist, to the Sochi Olympic team.

The decision on the women’s delegation left plenty of figure skating insiders grateful they hadn’t been placed on the selection committee. Kimmie Meissner●, the 2006 world champion●and 2007 U.S. champion, was among them.

“It’s so hard,” said Meissner, who watched with tremendous joy as Nagasu, her close friend, staged one of the most electric performances of her career Saturday, fighting for a place in Sochi.

“If you’re taking into account everything the skater has done, you’d want to send somebody like Ashley,” Meissner said. “I think they made the right decision, but it’s tough. I’ve kind of gone back and forth with it myself. I feel very sad for Mirai. She has worked so hard to get back to the top. I think we all thought she had that spot yesterday, but in this sport nothing is for sure.”

Wagner knew that as well, which is why she couldn’t stop her mind from lurching from one extreme to the other after twice falling on her rear during her performance Saturday, omitting one jump and two-footing the landing on others.

“There was so much on the line,” Wagner said. “I admit it: I didn’t pull through at national championships when I felt pressure.”

But she insisted her nerves would hold up in Sochi, freed from the dread of never qualifying for the Olympics.

“I can really let myself skate,” she said, “instead of having to worry about whether or not I’m literally going to watch my dreams fall apart, which last night I got a pretty good preview of.”

After leaving the arena, she joined her mother and brother at their hotel for a large glass of wine, and they stayed in the lobby well past midnight talking it over, a giant plastic bag beside her stuffed with the teddy bears and bouquets fans had tossed her in tribute and empathy. Then she retreated to her room, talked on FaceTime with her closest friends and watched “The Seven Year Itch” as her thoughts and emotions swirled.

“I danced with danger last night,” Wagner said Sunday. “I never want to feel that uncomfortable again.”