Sweden have won the 2012 Eurovision Song Contest in Baku, Azerbaijan, with their song Euphoria – but it was a disappointing night for the UK’s Engelbert Humperdinck who finished second last.

The upbeat dance song, by Swedish-Moroccan singer Loreen, had been the pre-contest favourite to win and scooped a landslide victory with 372 points.

Russia’s Buranovo Grannies – a troupe of folk-singing pensioners – finished a distant second, scoring 259 points for their song Party For Everybody.

Serbia’s Zeljko Joksimovic – who was a previous runner-up at the 2004 contest – finished in third place, while host nation Azerbaijan were fourth and Albania came fifth.

However there was disappointment for the UK’s Engelbert Humperdinck, who had kicked off the show with his ballad Love Will Set You Free.

The 76-year-old singer finished second last with 12 points – scoring marks off just four juries during the voting – and was only saved from the bottom slot by Norwegian singer Tooji, who came last with his song Stay.

And Jedward also failed to make the same impact as they did in 2011, picking up 46 points – and 19th place – for their song Waterline, despite an energetic performance.

The votes from the 42 countries taking part were determined by a mix of jury votes and viewer televoting – while the line-up in the final was decided following two semi-finals on Tuesday and Thursday night.

The UK was one of six automatic qualifiers for the final, automatically winning a place along with Spain, Italy, France and Germany as the five main financiers of the contest. Host nation Azerbaijan also received an automatic final place.

It is the fifth time that Sweden have won the contest, with their most famous victory coming with Abba’s Waterloo in 1974.

Since then they triumphed in 1984, 1991 and 1999.

Afterwards Loreen thanked those who had voted for her and said, “Thank you for believing in me. I wouldn’t have been able to do it without you.”

Her victory means that next year’s contest will be held in Sweden, with the host city to be determined at a later date.

The UK’s result – receiving points only from Belgium, Estonia, Latvia and Ireland – is the latest in a string of disappointing Eurovision scores.

Despite being one of the most successful countries in the contest history – with five victories and 15 second place finishes – recent years have seen the UK finish last three times and score the dreaded ‘nul points’ in 2003.

The UK’s best result in recent years came in 2009 with Jade Ewen’s It’s My Time – co-written by Andrew Lloyd Webber – which finished fifth. Last year’s effort, Blue’s I can, came 11th with a respectable 100 points.

Jedward also fared better last year with their song Lipstick which came eighth.