A taxi is reflected in a window at the office of taxi-hailing service Uber Inc in Hong Kong, Aug. 12, 2015. Reuters/Tyrone Siu

Uber has closed down operations in Denmark after running into legal troubles in the country. The ride-hailing company was declared an illegal taxi service after it ran foul of government regulations.

“It is not necessarily a farewell to Denmark, but a message to politicians that we must draw consequences from the law that is on the table, and that we can’t live with it as it appears now,” an Uber spokesman said in a media briefing Tuesday.

The company reportedly disagreed with a new law passed in Denmark on Feb. 27 which requires all taxis to be fitted with expensive seat sensors, video surveillance and taxi meters. In the media briefing, the Uber spokesman said that it had 2,000 drivers and 300,000 users in Denmark but suffered from regulatory troubles in the country, as well as in most of Europe.

Read: Is Lyft Better Than Uber?

Of all the measures required by the new law, it could have been the installation of taxi meters which would have forced Uber to move out of the country, since it impinges on Uber’s financial model of surge-based fares which calculates the fare in proportion to demand of its vehicles at any given time. The installation of such meters would require the company to come to a set a price per mile which could mean more government oversight as opposed to the company setting the fares.

The company has run into a host of troubles lately.

Read: Uber To Hire Chief Operating Officer Post Recent Scandals

In January, the company faced flak after its CEO Travis Kalanick joined President Donald Trump’s advisory council, with #DeleteUber becoming a popular trend on social media, leading many people to delete the app. Later in the same month, it was asked to pay $20 million to the Federal Trade Commission over misleading drivers over potential earnings. In February, the company was accused of systemic misogyny that led to regular sexual harassment at its offices. On March 1, a video of the company’s CEO arguing with a driver surfaced, leading to further loss of face.

Most recently, Uber president Jeff Jones quit the company March 19 and the company had to pull its self-driving cars off the roads after a crash March 25.