Helle Thorning-Schmidt
Helle Thorning-Schmidt, Denmark's prime minister, nearly lost her fragile coalition government over a deal to let Goldman Sachs buy a stake in state-owned utility firm Dong Energy Reuters

Squid isn't an especially popular dish in Denmark, but many Danes have a hankering to kill a giant vampire one at the moment.

Around 200,000 of the five million-strong population has signed a petition against the sale of a 19% stake in state-owned utility firm Dong Energy to the US investment bank Goldman "vampire squid" Sachs.

It cost Goldman 8bn Danish krone (£880m, $1.45bn, €1bn) and was on the brink of costing Denmark its fragile coalition government after the finance ministry gave the green light to the deal.

The Socialist People's Party walked out on the coalition over it, leaving the two remaining partners – the Social Democrats and the Social Liberal Party – clinging tightly on to the fraying government's seams.

Annette Vilhelmsen, leader of the socialists, has pledged to keep supporting the coalition in parliament even though she pulled out of it.

This means Helle Thorning-Schmidt, the Danish prime minister, is just about able to hang on to power, despite her frail coalition only having 61 of the 179 seats in parliament.

Much of the public rage over the Goldman-Dong deal is over the bank's plans to take its holding offshore to tax havens such as Luxembourg and the Cayman Islands. Goldman says it is abiding by all national and international tax laws.

"We are pleased with the approval of this transaction and look forward to making this significant minority investment alongside the Danish State, ATP, PFA and the existing minority shareholders," said a Goldman statement.

"This is a long-term commitment which reflects our support for the management team's current strategy across the Company's activities, including the significant renewable energy investments, which we believe will create value for all stakeholders."

As major shareholders – with the Danish taxpayer retaining a 60% stake – Goldman will have a big influence over executive appointments and how Dong is run.

According to the Financial Times, both Goldman and the government were shocked at how much anger the Danish public has shown over the Dong deal.

"Everybody is surprised by how big this has become," an anonymous government official told the FT.

"We understand that nearly everybody hates Goldman Sachs but you can't do business and say: 'you have the best offer but you can't win'."

The entire affair has been compared to popular Danish drama Borgen with its tales of political wrangling that surround the female prime minister and main character Birgitte Nyborg.

Real-life Danish prime minister Thorning-Schmidt grabbed headlines in December after being pictured taking a selfie with her UK and US counterparts, David Cameron and Barack Obama, at the funeral of revered ex-South African president Nelson Mandela.