The US government will allow people barred from entering the country in the early days of President Donald Trump's travel ban to re-apply for visas following a legal settlement with campaigners announced on Thursday.

Under terms of the agreement reached in a federal court in New York, the government must contact all individuals who were turned away as a result of the president's first executive order that came into force on 27 January, and inform them they may seek re-entry.

It does not guarantee applicants will receive new visas nor does it award them compensation, but obliges the government to act in "good faith" when processing their paperwork.

The settlement brings an end to the case Darweesh v Trump, a nationwide class-action suit filed by two Iraqi men detained at New York's JFK airport because of the ban. They were represented by numerous rights groups including the powerful American Civil Liberties Union.

It was the first legal challenge to the original executive order, and had previously succeeded in gaining an injunction on removing anyone from the US on the basis of the ban.

Texas Muslims come to the aid of Harvey victims Read More »

"Although the government dragged its feet for far too long, it has finally agreed to do the right thing and provide those excluded under the first Muslim ban with proper notice of their right to come to the United States," said Lee Gelernt, an ACLU lawyer involved in the case.

But the "legal fight against Muslim ban 2.0" will continue, he said, with the Supreme Court set to hold another hearing in October.

The first order, which sought to close for three months US borders to nationals from seven Muslim-majority countries, and to refugees for four months, caused chaos at airports and triggered protests in major cities.

Hundreds of nationals from the countries affected by the ban were detained on arrival despite having valid visas or even residency documents.

It was quickly challenged in court by campaigners and several US states, and was suspended on 3 February.

A revised version was announced in March barring nationals from six countries, though visa and green card holders were exempt.

The administration scored a partial victory in June, when the Supreme Court ruled that it could proceed with the ban, though people with a "bona fide relationship" to a US person or entity were exempt.