Lauren Hernandez has showed she belongs at the U.S. Olympic gymnastics trials. (Gregory Bull/AP)

Just before giving the requisite salute to the judges before each phase of a gymnastics competition, Lauren Hernandez conducts a small but important ritual of her own.

She puts one hand on the apparatus she’s about to tackle and, in silence, makes a prayer.

“That really grounds me,” the 16-year-old Hernandez explained on the eve of the U.S. Olympic trials. “Once I do that, for some reason, I’m able to think clearly. And it calms me down and centers me right before I compete.”

Hernandez’s uncommon poise as a first-year competitor in the sport’s senior ranks is striking. But what really stands out — and coaxed a nationally televised “Wow!” from tough-to-please national team coordinator Marta Karolyi at Hernandez’s breakout performance at the U.S. championships two weeks ago — is a magical performance quality that makes her so entertaining to watch.

Chellsie Memmel — an alternate to the 2004 U.S. Olympic team, a member of the 2008 U.S. Olympic team and now a gymnastics judge — spotted it well ahead of most, back in 2012, when Hernandez was a 12-year-old competing in the junior ranks.

“I saw her floor routine, and I was like, ‘Who is that sassy girl?’ ” Memmel recalled this week. “So it has been fun to watch her grow up and keep that sass in her floor routine.”

Hernandez has parlayed her infectious sass — and impressive all-around gymnastics skill and power — to a spot on the five-woman Rio Olympic team that was named Sunday night at the close of NBC’s live broadcast.

Following Sunday’s event-closing competition at the U.S. trials at San Jose’s SAP Center, Hernandez finished second with an overall score of 121.150 points. Three-time world champion Simone Biles was first with 123.250. Aly Raisman was third at 119.750. All three made the U.S. team headed to Rio.

Gabby Douglas, the 2012 all-around Olympic champion whose fall from the balance beam Friday night dropped her from fourth to seventh in the standings, finished seventh overall Sunday with 117.450 points and also made the team. Madison Kocian, who finished eighth Sunday with a score of 117.050, was the fifth member selected.

If Douglas’s shaky performance was the top story line of the first night of Olympic trials, Hernandez’s rock-solid showing Friday ran a close second.

She set the standard on the beam with a routine as stylish as it was daring, finishing first on the nerve-rattling apparatus with 15.5 points and looking nothing like a first-year senior in the process.

She was third on the floor exercise — her routine a playful, exuberant 90-second explosion of acrobatics and dance that had the capacity crowd of nearly 18,000 clapping and squealing from the opening tumbling pass. She ranked fourth on the vault. And she tied for fifth (though capable of higher marks) on the uneven bars, delivering a bold routine that includes four gasp-inducing release-moves.

“I had a goal coming in of [finishing] top three, and I did that,” Hernandez said after closing the first night second in the standings, behind only Biles. “So once I did that, I was pretty excited. It’s one step closer.”

Closer, of course, to the Olympic spot she has worked for since age 5, when she asked her mother whether she could take gymnastics lessons after growing a little bit bored in the dance classes she had taken since 3. Then, as now, she loved the sensation and the fantasy of flying.

She also loved performing. Growing up in Old Bridge, N.J., a short jaunt down the Garden State Parkway from New York, Hernandez is gifted with Broadway-worthy stage presence. She also comes from a family of athletes and achievers. Her father played baseball, her mother volleyball. Her sister, Jelysa, is a black belt in karate; brother Marcus ran track in high school and college.

“I think athletics just kind of runs through my family and runs through me,” said Hernandez, who likes to swim and ride her bike in her spare time. “My whole family is very determined. When we want something, we go get it.”

And the Olympics is what Hernandez has wanted nearly as long as she can remember.

It feels like yesterday that she was sitting on her couch watching Raisman, Douglas and the rest of the Fierce Five win team gold at the 2012 London Games, she confessed. So it’s hard for Hernandez to believe — even after claiming four bronze medals at U.S. nationals two weeks ago, in the all-around, uneven bars, beam and floor — that she’s here in San Jose, competing alongside the athletes she regards as role models, for a spot in Rio.

Honestly, she confided to the reporters who gathered around her on the final day of training this past week, it was hard to believe that she had been given a T-shirt emblazoned with “U.S. Olympic trials” to wear for her pre-competition interviews.

“I just turned senior this year, so everything is a little bigger for me,” said Hernandez, who celebrated her 16th birthday in June. “This is really cool. Just to follow in the footsteps of these girls who are so calm and collected. . . . I just want to follow their example and hopefully be a role model for other girls, too.”