Art lecturers and educators who claim they were sacked by the National Gallery have won the right to be recognised as workers in one of the first public sector gig economy cases.

The 27 claimants, who worked in the building overlooking Trafalgar Square in London, should have been classified as workers rather than freelancers, an employment tribunal has ruled.

The decision will set a significant precedent for others on unconventional hours in public sector organisations. Collectively the claimants, who gave talks for school tours and members of the public, had 500 years’ experience working for the gallery; one individual had been with the institution for 45 years.

The National Gallery argued that the claimants were self-employed, but the employment tribunal judge said that “it is unreal to describe the dealings between the parties as transactions in which the gallery stood as the ‘client or customer of any business undertaking’ carried on by any of the lead claimants”.

One of the claimants, Karly Allen, who worked for the gallery for 18 years, said: “This judgment cannot take away the fact that we have lost our jobs and the close relationship with the gallery which we loved; it does go some way to acknowledge the losses we have suffered and our contribution to the life of the gallery.”

Marie van der Zyl, a partner at law firm Ince Gordon Dadds, which represented the claimants, said: “This is an important case for all those who have unconventional working arrangements. The world of work is changing and there will be many individuals who are unsure of their status and rights. This case gives those individuals hope.”

Adam Ohringer, a barrister specialising in employment cases at Cloisters chambers, said: “We have become accustomed to private employers denying workers their legal rights. This is a wake-up call to the public sector and, I am sure, the first of many cases in which public bodies will be challenged over the misclassification of their staff and the circumvention of employment rights.”

A spokesperson for the National Gallery said: “[We] welcome the clarity provided by this decision, namely that the claimants in this case were not employees of the gallery.

“The gallery had no wish to get involved in litigation in relation to this matter. From the outset we would have welcomed the opportunity to resolve the issue through mediation, but the claimants did not respond to the Gallery’s requests to enable these discussions to begin since the claim arose.

‘The Gallery has not ‘dismissed’ anyone as part of this process. The majority of the people involved are still providing these services to us on the same basis as previously, whilst others involved in these claims have already accepted either employment or new contracts with us.

“It is important to state that this case should not be likened to the ‘gig economy’ debate that has been in the news recently, with legal cases brought against Hermes, Uber and Deliveroo. In fact, the National Gallery situation is exactly the opposite.”

• This article was amended on 4 March 2019. An earlier version incorrectly referred to an “industrial tribunal”. This has been corrected to “employment tribunal”.