"If you are in Tunisia and do not have essential reasons for being there, you are advised to leave," the Danish Foreign Ministry said on its website.
"There is a high risk of terrorist attacks against Western targets in Tunisia and at tourist attractions, public buildings, near security agencies and in places where large crowds are gathered," it said.
Nearly all Nordic holiday operators had cancelled their trips to the country in the second half of the year, the ministry said.
Denmark advised against all travel to the areas bordering Algeria and Libya.
Britain on Thursday also urged its nationals to leave the country, warning that local authorities could not provide "adequate protection" after last month's beach massacre.
Tunisia has brought in a raft of new security measures, including arming tourist police, since a jihadist gunman killed 38 foreign holidaymakers, 30 of them Britons, at the beach resort of Port El Kantaoui on June 26th.
On Saturday, the government declared a state of emergency for 30 days.
Finland on Friday also amended its travel recommendation for Tunisia to highlight "heightened risk for new terror attacks against tourists."
"The authorities are unable to secure the tourist areas' safety adequately," the Finnish Ministry of Foreign Affairs said, but stopped short of urging tourists to leave.