Simone Biles wins Gold in the gymnastics competition. (Photo by Jonathan Newton / The Washington Post)

RIO DE JANEIRO — Among the giggly sisterhood of the U.S. women’s gymnastics team, everyone agrees that to finish second to Simone Biles is the same as finishing first.

“If you get silver, you’re the best,” Aly Raisman explained with a laugh, “because Simone doesn’t count!”

And that shared logic is how it came to be, Tuesday at Rio Olympic Arena, that the final day of Olympic gymnastics competition produced two victors in women’s floor exercise: Biles, 19, who claimed a fourth gold medal to go with the bronze she’d earned on balance beam the day before, and Raisman, 22, whose silver represented first-place in gymnastics’ non-Biles division, bringing her medal haul to three.

“I’m in awe watching her, and I’ve trained with her for so long,” Raisman said of Biles, after the two stepped onto the medal podium and stood side by side, one last time, at these Summer Games.

There was so much to be happy about. Biles, who’d wanted to be just like Raisman as a younger gymnast, got to share the capstone moment of her Olympics debut with her role model and U.S. team captain. It was the second time that they’d finished one-two here in Rio, taking gold and silver in last week’s individual all-around final.

Both earned their floor exercise medals with tour de force performances that were rewarded with the highest marks they’d received at the Games — 15.966 for Biles and 15.500 for Raisman. Britain’s Amy Tinkler was a distant third (14.933).

Simone Biles leads a group of five fierce gymnasts representing the United States at the Rio Olympic games. (Ashleigh Joplin,Jayne Orenstein/The Washington Post)

“It’s pretty insane,” Biles said, eyes widening when asked how she felt about winning four golds and a bronze in her five events. “What I’ve accomplished in my first Olympics, I’m very proud of myself. I don’t know. It’s crazy.”

Given the difficulty of their acrobatic skills, Biles and Raisman were favored to sweep gold and silver on the floor exercise. Biles is a three-time world champion in her favorite event; Raisman, the 2012 Olympic champion on floor.

The day’s biggest surprise was delivered by Miami’s Danell Leyva, who won silver medals on the parallel bars and high bar just three months after a nasty bite by one his family’s American bulldogs left a gaping wound in his left calf, putting his Olympic prospects in jeopardy.

Leyva, who couldn’t walk for days as the wound slowly healed, was passed over for a spot on the Rio-bound men’s gymnastics team, named an alternate instead. But an injury to John Orozco created the opening just weeks before Opening Ceremonies.

With U.S. teammates urging him on from their seats at the opposite end of the arena, Leyva was a study in body control on parallel bars and stuck his landing to finish second to Oleg Verniaiev of Ukraine. Leyva was equally impressive on high bar, the circus-like show-stopper of men’s gymnastics, turning in the best performance his step-father and coach had ever seen.

“Nobody has a perfect day,” said Leyva, 24, “but I feel like this was as close to perfect as I possibly could have done….You just have to believe within yourself that you can do more than what people expect.”

Much was expected from the U.S. women’s gymnastics team, which opened the Rio Olympics by clobbering its closest competitor, Russia, by eight points to claim a second consecutive team gold. With Biles leading the way, it concluded the Games with nine medals — more than any U.S. gymnastics team in history.

The U.S. men, shut out of team honors, collected three individual medals.

With her triumph on floor exercise, Biles took her place alongside just four female gymnasts to win four golds in a single Olympics. And with a huge smile, she hopped onto the medal podium for perhaps the last time at an Olympics.

At 19, there is so much of life she wants to experience, having made the heart-rending decision at 14 to leave the public school she loved so she could train and compete like a champion-in-the-making. She’s not expected to make her decision about returning for the 2020 Olympics for some time. If she decides against, she could change her mind and reclaim her form, no doubt, with less than two years’ notice.

But Tuesday, she didn’t want to think about the long-term future.

“First, we’re going to have some fun!” Biles announced. “We might get to do some music-awards shows, walk the red carpet! We have a tour we’re all so excited about. And Aly and I have said we’re going to throw a huge pizza party once we land and watch the team finals.”

Biles had floor-exercise gold wrapped up on her second tumbling pass, which included her signature double flip with her body fully extended. The scoring sheet declared her routine the most difficult staged, but Biles never let on, flipping through the air as if she were romping in a moon bounce at a birthday party, daring herself to fly higher each time.

She was in an orbit all her own Tuesday. And she took her final bow in Rio with nothing left to prove.