The workers, including citizens from the US, Europe, Egypt and other Arab nations, were first jailed in 2013.

An Egyptian court has acquitted 40 pro-democracy NGO workers, in a retrial of a long-running case that has strained the country’s relations with the United States.

In 2013, 43 Americans, Europeans, Egyptians and other Arabs were sentenced to jail terms ranging from one to five years on various charges, including operating non-governmental organisations (NGOs) without necessary approval. Their offices were ordered to close.

In April, Egypt’s top appeal court overturned the jail sentences of 16 of the workers and ordered their retrial.

Many of the defendants, including at least 15 Americans, left Egypt at the time and received five-year sentences in absentia.

The remaining three defendants who were not acquitted on Thursday are among those who were sentenced in absentia, but did not apply for a retrial, a judicial source said.

Beginning in late 2011, Egypt’s crackdown on organisations, including US-based groups linked to its two main political parties, caused outrage in Washington, which supplies Cairo with $1.3bn in military aid each year.

The court at the time ordered the closure of the NGOs involved in the case, including the US-based International Republican Institute (IRI), National Democratic Institute (NDI) and Freedom House.

The Americans sentenced in absentia include the son of then-US transportation secretary Ray LaHood.