Food delivery work services platform Deliveroo is set to shut down its operations in Spain, months after the government announced changes to the legal status of gig economy workers, City A.M. reports. The UK-based company, which listed in London earlier this year, said it would consider pulling out of the market due to the high levels of investment needed and uncertainty over future returns.

In May, the Spanish government ruled that workers for food delivery platforms and other companies should be classified as employees.

In a statement Deliveroo said, “The company has determined that achieving and sustaining a top-tier market position in Spain would require a disproportionate level of investment with highly uncertain long-term potential returns that could impact the economic viability of the market for the company.”

A UK court in June found that Deliveroo employees should be classified as self-employed. However, another UK court earlier this year ruled Uber drivers should be treated as employees. Fiona Coombe, legal and regulatory research director at SIA, wrote in a CWS 3.0 article last month that the cases differ in that the UK Deliveroo drivers did not have to undertake the work personally.

Deliveroo said its decision to withdraw from Spain is subject to a full consultation with affected employees and riders, which will begin in September and take about a month, City A.M. reported.