Bethesda’s Katie Ledecky twisted the gold medal hanging around her neck as if it were a strand of hair, massaging the ribbon unconsciously with red-and-blue-painted fingernails. She talked about her victory in the Olympic swimming 800-meter freestyle Friday night as casually as if she were discussing her plans for after school or her score on a history test.

Apparently, only those watching comprehended the magnitude of what Ledecky, 15, had done on the sport’s biggest stage. The rising sophomore at Stone Ridge had not merely won an Olympic gold medal in her first international competition; she broke Janet Evans’s 23-year-old American record with her finish in 8 minutes 14.63 seconds, and just missed the world record of British legend Rebecca Adlington, who was in the race and couldn’t keep up.

Adlington, who earned the bronze medal in 8:20.32, spoke almost reverently about Ledecky’s effort, throwing out a host of superlatives: “Unbelievable,” she said. “Fantastic . . . absolutely amazing.”

Said USA Swimming National Team Director Frank Busch, shaking his head as he left the Aquatic Center: “It’s one of the biggest shocks I’ve ever seen in the Olympics. Stuff like this just doesn’t happen.”

Spain’s Mireia Belmonte Garcia took second, 4.13 seconds behind Ledecky, who savored the stunner with a mix of smiles and shrugs.

“I knew if I put my mind to it, I could do it,” Ledecky said. “I wasn’t intimidated at all.”

Busch said he watched the race unfold with pure awe. As the crowd filled the building with chants of “Becky! Becky!” for Adlington, the country’s longtime swimming darling, Ledecky took the lead from the beginning and never wavered. She swam under world-record pace until she slipped behind in the final 50 meters, falling just 0.53 of a second short of Adlington’s record from the 2008 Summer Games.

“That’s a young lady that just showed resolve,” Busch said. “[She seemed to be saying] ‘I don’t know what I’m doing, but if somebody is going to go with me, I’m going to make you hurt.’ Nobody could go with her. This is a young lady just determined to win.”

Said Donna de Varona, the 1964 Olympic champion who watched from the stands: “It’s the innocence of youth . . . [and] the ambition of youth.”

The time was more than five seconds faster than Ledecky swam at the U.S. Olympic trials in July and about 20 seconds faster than a year ago.

“I couldn’t have gone any harder,” Adlington said. “I couldn’t have gone any faster.”

Before the race, Michael Phelps, who won the gold medal in the 100 butterfly earlier that night, sought out Ledecky to wish her luck. She recalled her first meeting with Phelps — when she was 6 years old.

She had approached him after a meet at the University of Maryland as he walked to his car, listening to music through headphones. It was a year before he would win six gold medals at the 2004 Summer Games in Athens.

She asked him for his autograph. He had no clue who this little girl was, or what she would become. He learned Friday.

“It looked like she went out, had some fun, won a gold medal and just missed a world record,” Phelps said. “That’s a pretty good performance for a 15-year-old.”

Ledecky began swimming at age 5, joining what was the Palisades Summer League a year later. By the time she was in the third or fourth grade, she said, she drifted away from other sports to concentrate on the pool, and soon was qualifying for sectional championships.

Last summer, as the U.S. senior national team piled up medals at the world championships in Shanghai, Ledecky piled up achievements, too, at the junior nationals in Palo Alto, Calif.

There, she won junior titles in the 400, 800 and 1,500 meters. That fall, she and her coach at CUBU Swim Club, Yuri Suguiyama, sat down and talked about her future.

They agreed she would shoot for this year’s Olympic trials, and an ultimate goal, one they would keep as their little secret: making the U.S. Olympic team.

Ledecky’s times kept dropping, her performances rising. Phelps’s coach, Bob Bowman, was so impressed after watching at a grand prix meet in Charlotte in May that he brought her up out of the blue to a roomful of reporters at the U.S. Olympic media summit days later, saying she was a youngster to keep an eye on.

Terri McKeever, coach of the U.S. Olympic women’s team, also watched Ledecky in Charlotte, when she swam a career best in beating a veteran field.

“I came home and told one of my assistants, ‘She’s going to make the Olympic team,’ ” McKeever said. “You could see the intangible things. . . . Her focus is really impressive for a 15-year-old. . . . She’s a smart swimmer. It’s not just get-in-there-and-go.”

Ledecky admitted at the U.S. trials in Omaha that she had not expected to make the team even the year before, but once she did, she said, she immediately got to work.

“I’ve been training really hard for the last four or five weeks,” she said. “It’s been great. I’ve been swimming really well. . . . [In recent days] I’ve been able to watch all of the finals and prelims. I knew exactly what to expect.”

Adlington insisted that it’s not as easy as Ledecky described it. In her fourth Olympic Games, Adlington said she battled between not wanting to eat anything and feeling like she would throw up: “The nerves . . . you go through so much emotion . . . now I’m just so drained.”

Ledecky said she wasn’t really nervous at all. Phelps’s victory and the world record Missy Franklin, 17, set earlier in the 200 backstroke motivated her, she said. The thunderous crowd support for Adlington inspired her.

“I took it out fast,” she said, “ and I was able to come home hard.”

Her parents, brother and several relatives on her mother’s side cheered her in the stands, wearing Team Ledecky T-shirts. Back home, she knew her friends at Stone Ridge would be holding a viewing party to watch the live stream on NBC. A few others in the largely partisan crowd waved American flags.

Cecile Divino, a 1993 graduate of Stone Ridge who lives in London, waved a “Ledecky Team USA London 2012” sign. She wore a Team Ledecky T-shirt mailed to her from Maryland.

“I was the only one among all of these Brits cheering for her,” Divino said. “But everyone was quiet in the end.”