The signs were posted near the northern Jutland municipality of Thisted, which is home to six asylum centres.
Placed under existing signs, the new ones had a directional arrow and the text ‘Syrien 4426' and ‘Irak 5317', the distance in kilometres to the home countries of many of the asylum seekers.
The nationalist Danes' Party (Danskernes Parti) claimed credit for the idea behind the signs on its website.
“The Danes' Party has long planned a campaign in Thisted, which overnight on Friday was complemented by hanging street signs near the city, creating a major debate throughout the country,” the party wrote on its website.
The party didn't say directly whether its members had hung the signs, an illegal act, but rather extended “a huge thank you to those who set up the signs”. The nationalists said that the signs were necessary to create a debate about what impact the asylum centres will have on the local community.
“The Danes' Party wants to show the migrants the way back. That's why we've started a campaign in Thisted to offer locals an alternative to the insecurity that has arisen in Thisted after the arrival of so many migrants,” party leader Daniel Carlsen said.
Carlsen referred to reports from local women in Thisted who said that they have felt harassed by refugees while out at night.
A tent camp hosting nearly 400 asylum seekers opened in Thisted in November and local officials have confirmed that some of the camp's residents have displayed behaviour that has left young women feeling unsafe in the streets and in area night clubs.
The short-lived presence of the signs were condemned by some and praised by others.
Thisted's deputy mayor, Ib Poulsen of the anti-immigrant Danish People's Party, said he saw no problem with the signs.
“We have a finance minister who has said that the migrant influx costs society 11 billion [kroner] per year – and that's probably low. It could have made a difference to use that money on welfare. I want to have a debate on other ways to use that money. This is a way to create a debate on immigration and that is fine with me,” he told Ekstra Bladet.
Others, including the ruling Venstre party, said the signs were in poor taste.
“We want to reduce the number of asylum seekers in Denmark to the absolute minimum, but telling people to just shove off back to Syria where there is war is distasteful,” party spokesman Marcus Knuth told Jyllands-Posten.
Area resident Signe Marguard Rønn took the signs down along with a friend after seeing photos of them posted to Facebook.
“I think it's a shame that people who have travelled thousands of kilometres to reach safety are greeted with a sign that shows them the way back and sends a signal to ‘scram',” she told Jyllands-Posten.
Denmark registered 21,000 asylum applications in 2015, making it one of the top EU destinations per capita for migrants after Finland, Austria, Germany and Sweden. The government expects another 25,000 asylum seekers in 2016.