America’s newest gymnastics queen earned a confetti-covered crown Sunday night at HP Pavilion by the narrowest of margins.

The vivacious Gabby Douglas edged world champion Jordyn Wieber for the first time in her career to win the all-around title at the U.S. Olympic trials at HP Pavilion. The victory highlighted a thrilling conclusion to the four-day event when Douglas joined the rest of the Olympic team as shredded paper rained down on them as they stood before a cheering sold-out audience.

Douglas, 16, won the lone automatic berth by 0.1 point and will be joined in London by Wieber, McKayla Maroney, Kyla Ross and Aly Raisman.

It’s a formidable combination that will be favored to win the team gold medal after winning the world title last year.

“This was the ideal team I was thinking about, but they had to prove themselves,” national team coordinator Martha Karolyi said.

No one proved themselves more than Douglas, a 16-year-old from Virginia Beach, Va.

While the teen soared, 2008 Olympians Alicia Sacramone and Nastia Liukin probably ended their careers in San Jose, as neither was named to the five-woman team. Sacramone performed well, but Liukin fell hard on the uneven bars and had to fight back tears as the audience cheered wildly to pay tribute to her storied career.

The tension built Sunday as only 0.3 points had separated Wieber and Douglas on the final day of trials. Then they traded the lead, routine after routine.

On the final of four rotations, Douglas and Wieber stood on the floor in their purplish leotards waiting. And hoping. It was their final moment to make a statement.

Wieber’s vault ended in the slightest of hops to score 15.8. Douglas, 16, told herself, “OK, I’ve got this.”

Known as ” The Flying Squirrel” for the way she soars through routines, she had an electric smile and electrifying performance on the floor exercise. Douglas put her hand to the heart upon finishing.

When someone in the audience screamed, “Gabby, you won!” she felt chills.

Wieber, also 16, let the result roll off her. But she acknowledged feeling nervous throughout the day.

“I definitely wanted to win,” said Wieber, of DeWitt, Mich. “But I made a few mistakes on the beam.”

No doubt Wieber and Douglas will take the rivalry to the Summer Olympics, where they will face the formidable Russians Aliya Mustafina and Viktoria Komova.

It should make for good theater if Sunday’s competition was any indication.

Douglas started the evening with an impressive vault that earned a 16.0 score. She followed that with a 15.9 on the uneven bars.

Douglas goes so high on the bars it takes an air traffic controller to monitor her flight pattern. But disaster almost struck when it appeared her hand slipped. Somehow the 5-foot gymnast held tight. She kept going to earn the big score.

“You have to make it look like nothing happened,” Douglas said,

As Douglas hit her dismount she flashed a smile while her father waved an American flag.

Timothy Douglas, an Air Force staff sergeant serving in Afghanistan, arrived in San Jose on Friday in time to watch his daughter at the trials. He had yelled her name during warm-ups at HP Pavilion.

“I’m like, ‘Who’s calling my name?’ ” Douglas recalled. “And then I look up. It was my dad and his friend, and I haven’t seen him in a while. They were holding up the flag. And I almost felt like bawling. I was like, ‘Oh, my gosh, Dad.’ “

By the time she was the newly minted trials champion, Douglas did become emotional.

But this is one step in a summer of promise.

“We don’t have to back off now,” Douglas said.

Contact Elliott Almond at 408-920-5865 and follow him on Twitter at http://twitter.com/elliottalmond.