It took the intervention of politicians, a pop singer, and a petition with hundreds of thousands of signatures, to ensure the happy ending to the story.
Iceberg the dog was due to be put down by authorities in the Scandinavian country because her breed - the Argentinian mastiff - is considered dangerous to humans under Danish law.
Her owner, Italian chef Giuseppe Perna, says he only became aware he was keeping the pet illegally in Denmark after two-year-old Iceberg was embroiled in a skirmish with another dog and was taken away by the police. Before that, she had cleared customs and was carrying all the right documents, according to news agency Ansa.
READ ALSO: Italian gelateria debuts ice cream for dogs
Enpa bombarded the Danish embassy with emails, eventually forcing a meeting at the country's Italian embassy.
Meanwhile, the Save Iceberg campaign on petition platform change.org gathered more than 374,000 signatures, and Italian pop singer Noemi joined hundreds of others for a protest last week outside the Danish embassy in Rome.
It was a success, with Danish Environment Minister Esben Lunde Larsen announcing on Wednesday that Iceberg would be allowed to go home.
"When it comes to foreign dogs, I find it hard to see that the problem is not best solved by sending the dog back to its homeland alive," Larsen commented, saying such a change in the law was the best solution "for Denmark, for dogs, and not least for Iceberg".
Foreign Minister Angelino Alfano welcomed the decision, having lobbied his Danish counterparts for the dog's safe return.
"I asked Danish authorities, via ambassadors, to save Iceberg's life by allowing Giuseppe to bring her back to Italy," he wrote on Twitter on Friday.
READ MORE: Denmark returns stolen gold cart of Etruscan prince to Italy