LONDON (AP) — She dreamed a dream, and it very nearly came true.

But Susan Boyle 's reality show journey finished Saturday with a second-place finish in the finals of "Britain's Got Talent," an ending that didn't fit the fairy tale. Instead of the 48-year-old internet sensation, an exuberant dance troupe called "Diversity" took the 100,000-pound ($159,000) prize and will perform for Queen Elizabeth II at the Royal Variety Show.

Boyle paced around the stage as the hosts named the top three of the ten final acts, and looked almost relieved when her name was called as the runner-up. She recovered in time to graciously praise the dancers.

"The best people won," Boyle said. "They're very entertaining. Lads, I wish you all the best."

Boyle then curtsied several times to the audience, gave them her signature shimmy, and strolled offstage.

It had been a tumultuous week for Boyle, a woman previously unused to the limelight. She lost her cool during a confrontation with two reporters, and the police intervened. One contest judge said Boyle had contemplated pulling out of the competition to soothe her frazzled nerves

But when she stepped into the spotlight Saturday, Boyle seemed more polished — and animated — than in previous appearances.

She wore a modest, but glamorous, floor-length gown, and chose to go back to the song that rocketed her into the international spotlight: "I Dreamed a Dream," from the musical "Les Miserables."

Her hometown of Blackburn, Scotland — a small, working class village about 10 miles (16 kilometers) west of Edinburgh — rallied round her, stringing up posters and signs in her support. Friends and neighbors gathered at a local pub to watch the performance.

"I've known her for many years," said 72-year-old neighbor Margaret Yule. "She's a lovely lassie and she will do well whatever happens. Susan is about the singing, and fame and fortune won't change her."

Millions tuned in to the live program and voted by telephone afterward.

Boyle was up against a host of everyman acts determined to find stardom on reality television, including Shaheen Jafargholi, a 12-year-old whose voice has been compared to Michael Jackson's, Hollie Steel, a 10-year-old who turned in a solid performance after a tearful semifinal meltdown, and a grandfather-grandaughter singing duo.

And then there was "Stavros Flatley," a father-son act who parodied "The Lord of the Dance" by romping around the stage shirtless, in blond wigs and leather pants, combining Greek and Irish dancing and music.

But it was Boyle whom people tuned in to watch.

After her first appearance in April, Boyle became the favorite to win the competition. As she stepped on stage during auditions, her frumpy appearance drew condescending looks from the studio audience and the judges, but her soaring, evocative voice silenced the doubters and turned her into an Internet sensation.

The first moment Boyle sang was one that has been viewed millions of times, the fifth-most watched clip in history on YouTube. It was a moment that went down in reality-show history.

As Boyle hit a high note at the end of the song's first line, judge Simon Cowell's eyebrows rose along with her voice. The audience went mad. And a star was born.

She has since appeared on the "Oprah Winfrey Show." Demi Moore tweeted about Boyle on her Twitter feed. Boyle dominated Britain's tabloids — but there were signs she was feeling the heat.

She acknowledged Saturday that it had been a stressful few weeks, but said onstage that it had been "well worth it."

Cowell said that she'd been given a rough ride, but that she was "a nice, shy person who wants a break."

The U.S. version of "America's Got Talent" debuts on Tuesday, June 23.

Watch Susan Boyle's repeat performance of "I Have A Dream"

Watch the announcement of the voting results.