A previous victor in 2012, Loreen is the first woman to win the eccentric, much-loved competition twice and only the second person to do so after Johnny Logan for Ireland in the 1980s.
It is a record-equalling seventh Eurovision crown for Sweden, and means the Scandinavian nation will host next year's contest on the 50th anniversary of ABBA's win -- the country's first -- with breakthrough hit "Waterloo".
Loreen -- real name Lorine Talhaoui -- told reporters that her victory with dance-pop track, "Tattoo", felt "surreal" and "so beautiful", and had left her "seriously overwhelmed".
Born in Sweden to parents of Moroccan Berber origin, the 39-year-old's win for Sweden over 25 other countries competing in the final was celebrated in her homeland.
"It feels wonderful," she said.
She narrowly triumphed over Finland's Kaarija after the public and jury votes were combined following an evening of typically eclectic musical acts in Liverpool.
Third place went to Israel, with Noa Kirel's "Unicorn", as more than 160 million estimated viewers watched on television around the world.
Last year's runner-up Britain selected Liverpool -- home of The Beatles -- to stage the Europop music festival after organisers ruled it was impossible for 2022 victors Ukraine to do so amid Russia's ongoing invasion.
During the glittering spectacle in northwest England, reports emerged that Moscow was unleashing a fresh barrage of bombs on Ukraine.
The attack included Ternopil, the hometown of Ukraine's entry this year.
Band Tvorchi were performing electro-pop offering "Heart of Steel", which was inspired by the siege of the Azovstal plant in Mariupol, as air raid sirens rang out across their city.
"Ternopil... was bombed by Russia while we sang on the Eurovision stage about our steel hearts, indomitability and will," the band said on Instagram.
"Europe, unite against evil for the sake of peace!"
Throughout the contest, Britain sought to keep Ukraine front and centre.
Central Liverpool was awash in the yellow and blue of the country's flag while displaced Ukrainians were among the 6,000 fans packed into the M&S Arena host venue.
"It feels like I'm home," Vasylyna Kindrat, who fled Lviv in December, told AFP as she headed into the waterfront arena.
The 25-year-old added she was hoping for victory not in Eurovision "but for the war".
Earlier, British spectators echoed the sentiment.
"We're supporting Ukraine, our heart is bleeding for them," said Jenny Birchett, 70, a theatre worker dressed in Ukrainian colours.
"We feel it's theirs, the Eurovision, more than ours," she added, flanked by her daughter.
UK Prime Minister Rishi Sunak lauded the "fantastic celebration" shortly after Loreen's win.
"Liverpool, you've done the United Kingdom and Ukraine proud," he said.
War and peace
Sweden and Finland had been the bookmakers' favourites heading into the contest beloved for its kitschy, quirky performances.
Sweden's biggest broadsheet Dagens Nyheter on Sunday hailed Loreen's victory an "enormous, unbelievable feat", praising her ability to touch audiences "like few others do".
"She's a strange combination of vague and ethereal," it mused.
Rapper Kaarija, representing Finland, came a close second after a memorable performance of "Cha Cha Cha", delivered in his distinctive green bolero-style jacket with spikes around the neck, which has become a craze in his homeland.
After coming in 16th place, France's contestant La Zarra showed the cameras her middle finger, later defending her "gesture of disappointment" to French media.
The home crowd went wildest for the UK's entry, Mae Muller, who flopped in the vote count.
Britain's Sam Ryder, runner-up in 2022, performed his latest song -- with Queen's Roger Taylor on drums -- during the voting for this year's spectacle.
He was pipped to the coveted glass microphone trophy by last year's winners, Ukraine's Kalush Orchestra, who also reappeared Saturday to kickstart the night.
The band performed in a pre-recorded video -- featuring a surprise appearance by the Princess of Wales, Kate, playing the piano -- and also gave a live performance.
Although there was the usual riot of colour, camp and unbridled joy, several of the contest's songs evoked the Ukraine war.
Switzerland's young singer Remo Forrer conveyed a message of peace with his track "Watergun".
Meanwhile, Croatia's extravagantly moustachioed Let 3 performed "Mama SC", seen as a veiled attack on Russian President Vladimir Putin and "human stupidity".
Politics preceded the finale, with a row erupting Friday over a proposed appearance by Volodymyr Zelensky.
For fear of politicising the event, the European Broadcasting Union refused an invitation for the Ukrainian president to send a message.
That came despite Russia being barred from participating and the overtly political message of some songs, and prompted criticism from the UK government.