(Bloomberg) -- Amazon.com Inc. drivers operating under a gig economy program in Spain should have been hired as formal employees and not freelancers, a Madrid court ruled. 

The judge rejected Amazon’s argument that it acts as an intermediary who connects retailers and distributors.

This is the first time a court has found against the e-commerce giant’s Amazon Flex service, according to a note published by labor union UGT.

Amazon Flex, which began in the US in 2015 and expanded to Spain three years later, paid drivers to deliver packages in their own vehicles. It ceased operations in 2021 soon before Spain passed a law to turn delivery riders into employees.

Amazon plans to appeal the decision, according to a company spokesperson. The company is awaiting a decision on the same matter in Barcelona. 

©2023 Bloomberg L.P.