RIO DE JANEIRO (AP) — Danell Leyva wasn't even supposed to be competing in the Rio Games.

A dog bite to his leg slowed his preparations this spring and he was relegated to alternate status when the U.S. men's Olympic gymnastics team was announced in late June. He wasn't added to the five-man squad until John Orozco injured his left knee a month ago.

On Tuesday, Leyva made the most of his second chance, winning silver medals in both the parallel and high bars.

"Nobody has a perfect day, but I feel like this was as close to perfect as I could possibly have done," he said. "I'm incredibly happy."

Leyva was thrilled to have navigated through his many obstacles to win two medals. However, there was one person that was probably just a bit more jazzed about his triumph.

His stepfather and coach Yin Alvarez ran around jumping and screaming — basically freaking out — after both of his performances.

"No matter what I do Yin is always more excited," Leyva said.

Alvarez maintained that energy long after the final medal ceremony. He bounded through the mixed zone high-fiving people and sporting a huge grin.

"I always say any medal, any color is good," Alvarez said. "So two silver medals in one competition in the same day is amazing."

Leyva, who won a bronze medal in the all-around competition in London, went first on the parallel bars on Tuesday. He pulled off a nearly flawless routine, and when he stuck the landing without so much as a hop he knew he'd be on the medal stand. He was even more confident after seeing his score of 15.900. But that didn't make the long wait for the final results any easier.

"It was a little stressful waiting for all the scores," he said.

He wasn't able to let up and fully soak in the moment after he won his first medal with only about an hour until he'd take on the high bars. He even issued a silent warning the apparatus as he was receiving his first medal of the day.

"Even when I was on the podium I was looking over at the high bar and I was like: 'I'm going to get you now, boy,'" he said.

Leyva fell on high bar during the team competition a week ago as the Americans finished a disappointing fifth. Even though they were too far back for his late fall to have mattered much in the standings, Leyva was hard on himself about the miscue and was relieved to stick his routine in the event finals.

"This was absolutely redemption, not only for me but for the team as well," he said.

He went last on the high bars, and his score of 15.500 knocked teammate Sam Mikulak out of a bronze medal and into fourth place. Leyva's big day gave the Americans three medals in men's gymnastics after Alex Naddour won bronze in the pommel horse.

Leyva's work not only allowed him to bounce back after his tough day in team competition, it was validation for the 24-year-old.

"Things didn't happen the way I expected, and it was unfortunate the way I was named onto this team," he said. "But that's what this medal is for — to show that I deserved to be on that team just as much as John did. And this is for him just as much as it's for me."