RIO DE JANEIRO (AP) — Gabby Douglas watched Aly Raisman stick the dismount on the beam, then rose from her seat and gave her American teammate a big hug.

Never mind that Raisman’s success in Olympic qualifying Sunday ensured that Douglas couldn’t defend the all-around title she won in London four years ago. Douglas had shaken off a sub-par performance in Olympic trials and quieted critics who were convinced she didn’t deserve to make this team.

For her, that was enough.

“I’m not disappointed at all,” she said. “I have no regrets.”

Douglas finished third behind Simone Biles and Raisman. Only two gymnasts per country can compete in Thursday’s final, leaving Douglas out of luck. The divide between Douglas and Raisman was slim. She was edged by less than a half a point.

Douglas was attempting to become the first repeat all-around winner in nearly 50 years. She took time off after her triumph in London and put together a sometimes rocky comeback in which she switched coaches three times. Yet she’s always had a knack for putting adversity behind her when it mattered, and when national team director Martha Karolyi rewarded her with a spot on the five-woman team, she immediately responded.

Douglas was solid in all four events, but really sparkled on the uneven bars. She earned a score of 15.766 — good for third overall and earning her a spot in the event final later in the games.

“I just really wanted to do a good bar set and really swing and just flow and stick the dismount — the polishing touch,” she said.

She completed the beam without a hitch before watching Raisman do the same. It was a stark improvement from the Olympic trials where Douglas fell off the beam not once, but twice, leaving Karolyi to defend the decision to put her on the team.

“I think Gabby just proved that she has a place on this team,” Karolyi said. “I know our decision was very much questioned. But I’ve known Gabby for many years and I knew we could make the necessary improvements that she would be a great asset to the team.”

Douglas beamed when told what her coach said, but the comments were certainly no surprise to the 20-year-old. She’s been bolstered by the encouragement of Karolyi for years.

“She said: ‘I believe in you, and you can go out and do it,'” Douglas said. “At the end of the day, that means so much coming from the head coordinator of gymnastics. ‘Cause she’s very precise.”

She was adamant that proving people wrong wasn’t the motivation behind her work on Sunday.

“I just wanted to go out there and believe in my abilities and use the talent that I was given,” she said. “I wasn’t concerned with anything else.”

Douglas’s teammates raved about her performance and lamented that she wouldn’t get a chance to compete for all-around gold. The top 24 finishers advance to the all-around finals and the American team is so dominant that if not for the rule the entire five-person team would probably advance.

“I hate the two per country rule … I wish that they would change it but I don’t think that they ever will,” Raisman said. “That’s the rules. You’ve got to respect their decision, but it is heartbreaking.”

However there’s no reason to feel too bad for Douglas. She’s almost certain to collect another gold medal with the team the overwhelming favorite to win it all. She’ll get another chance at a medal in uneven bars. Perhaps that’s part of the reason why Douglas took Sunday’s setback so well.

“I would have loved to go out there and defend my title, but right now I’m just rejoicing and so far this has just been an amazing experience,” she said. “There’s nothing to be ashamed about.”