The lofting vocals of Ernman's entry, La voix, won the hearts of Swedish TV viewers, allowing the mezzosoprano to squeak past Caroline af Ugglas's rough and soulful lament Snälla Snälla (‘Please, please').
“I'm about to faint,” she told the Aftonbladet newspaper minutes after being named the winner.
“It's totally unbelievable. I don't know what I should say, I'm totally blank!”
The male trio of Swedish Idol veterans EMD came in third place, with pre-contest favourite Måns Zelmerlöw claiming the evening's fourth spot.
After the points from the various juries around the country had been tallied, Zelmerlöw had a healthy lead over the second place song, while Ernman lagged in the lower half of the eleven entrants.
And once the 1,748,970 viewer votes had been added and corresponding points totals were assigned, af Ugglas climbed into the top spot with only one additional infusion of points left to be added.
But the final set of points, awarded to the artist who received the most votes from viewers, went to Ernman, allowing her to snatch victory from af Ugglas at the last instant.
Ernman's entry in the 2009 contest was viewed as something of a gag, and few expected her to advance out of the first round. But the 38-year-old opera singer surprised the Swedish music world – not to mention herself – in advancing directly to the Melodifestivalen finals from her qualifying round in Malmö two weeks ago.
Ernman's opera-inspired ballan La voix was one of four songs in the 2009 Melodifestivalen co-written by Fredrik Kempe, an opera singer and song writer who, along other songs, helped pen Hero, which won the contest in 2008 when performed by Charlotte Perrelli.
The Melodifestivalen victory has earned Ernman an unexpected trip to Moscow in mid-May as Sweden's entry in the Eurovision Song Contest, a trip which may complicate her already busy touring and performance schedule.
Earlier in the week, Expressen reported that Ernman is contractually obligated to appear in Vienna to rehearse as the lead in a production on May 12th, the same day as the Eurovision semi-finals get underway in Moscow. The following day, she is set to appear in a production of Cinderella back in Stockholm
The newly crowned Melodifestivalen champion barely has any time to celebrate her victory, as she's set to board a plane to Germany on Sunday morning to start working “for real” again.