A British court says workers at foreign embassies can sue over alleged discrimination and low pay, ruling that state immunity doesn't protect the missions from legal action.

But the Court of Appeal also ruled that individual foreign diplomats are protected from litigation by diplomatic immunity.

Three appeals judges ruled in a case brought by two Moroccans, a cook and a nanny, who were employed by the Sudanese and Libyan embassies in London.

They said they were paid less than minimum wage and were forced to work unlawful hours.

The ruling means they can pursue claims before employment tribunals.

But two domestic workers who claim they were trafficked and subjected to discrimination while working for a Saudi diplomat and his wife were told their employers were protected by diplomatic immunity.