"The coup generals sent out a public statement reiterating that Denmark is not welcome in Mali," Foreign Minister Jeppe Kofod said, referring to a repeated demand from the Malian leadership.
"Of course we do not accept that. That is why we have also decided... to bring our forces home," Kofod told a press conference after a meeting in parliament.
"We are there at the invitation of Mali. The coup generals, in a dirty political game, have withdrawn that invitation. Unfortunately, it is a game we see because they do not want a quick way back to democracy," Kofod added.
The junta, which came to power in a coup in August 2020, first asked Denmark to withdraw its troops on Monday, following a deployment it said had been undertaken without consent.
The next day, Kofod told reporters that Danish forces were in Mali "on a clear basis" following an invitation and that his government was seeking to clarify the issue.
Mali's junta late Wednesday responded by repeating its demand while calling Kofod's comments "inappropriate".
A contingent of around 90 Danish soldiers arrived in Mali to join European special forces supporting the country's anti-jihadist operations earlier this month.
Denmark has previously sent troops to participate in military interventions in Mali, some with the UN's MINUSMA peacekeeping force and others with the French-led Operation Barkhane.
The new contingent was joining Task Force Takuba -- a 900-troop French-led unit launched in March 2020.
Other contributors are the Netherlands, Estonia, Sweden, Norway, Belgium, the Czech Republic, Portugal, Italy and Hungary.
Mali has been struggling to quell a brutal jihadist conflict that first emerged in 2012, before spreading to neighbouring Burkina Faso and Niger.