She had appeared in the earliest promo ads for the American version of the British hit show. And Melanie Amaro was a breakout star in one of the first episodes of “The X Factor” this fall.

Now the teen from the British Virgin Islands, who was originally not part of the Final 12 for the show (though in an elaborate gesture, judge Simon Cowell came to her house and admitted he made a mistake), Melanie Amaro won the first U.S. “X-Factor” competition Thursday, bagging a $5 million record contract and an appearance in a Pepsi Super Bowl Commercial.

“Oh, my God!” is about all she could say to the news she had won. Mobbed by her family she extracted herself enough to sing a tearful yet still powerful version of Beyonce’s “Listen” — the song she last sang for votes Wednesday night.

In winning, she edged 30-year-old Josh Krajcik of Ohio, who said “I feel amazing. Melanie deserves it, she’s got a wonderful voice.” Finishing third was Chris Rene, the hip hopper in rehab.

The win was a feather in the cap of Simon Cowell, the judge and executive producer who mentored the women under 30 on the show, of which Aparo was the last one standing. “America, thanks for giving this girl the opportunity. She’s going to represent this country. She’s a star. I’m very, very proud. I’m very grateful.”

The two hour finale was full of performances — from the ousted Top 12 — and from 50 Cent, joined by various superfluous members of the Lakers as well as the former competitor Astro; Justin Bieber, joined by Stevie Wonder and the former contestant Drew (a Bieber fan); Pitbull and Ne-Yo, joined by fourth place finisher Marcus Canty; and Leona Lewis, a past winner of the British “X-Factor.”