A man was arrested after threatening to blow himself up at a refugee centre in eastern Denmark on 10 August.
Police in Funen said that a 22-year-old Iranian refugee threatened to blow himself up after climbing onto the roof of the Nyborg refugee centre. He was arrested without incident after discussions with police negotiators at about 1.30pm local time.
"Love worries" may have caused the man to make the threats, police said after initial questioning.
Earlier, police surrounded the asylum centre, which is home to 500 refugees, and imposed a no fly zone over the area.
All those in the centre were taken to safety, and no-one was injured, police said. The no-fly order has now been lifted.
Millions of refugees and immigrants entered Europe in 2015, many fleeing conflict and poverty in Africa and the Middle East.
Denmark received 21,000 asylum applications last year, up from 14,815 the previous year.
The Danish government has introduced a series of controversial measures in response to the increase in the number of asylum seekers entering the country. A law allowing authorities to seize jewellery and other valuables belonging to refugees to finance their stay was criticised by human rights groups earlier this year.
The deputy leader of the anti-immigration Danish People's Party, Soeren Espersen, earlier in July called for a ban on Muslim asylum seekers entering the country, following terror attacks in Germany and France.