Foreigners who were barred from entering the U.S. during President Donald Trump's first attempt to ban travel from seven Muslim-majority nations will get government help reapplying for visas under a lawsuit settlement reached Thursday.

Civil rights lawyers and the Trump administration announced the deal in during a conference call in federal court in Brooklyn, one scene of the legal battle over the treatment of hundreds of travelers who were detained at U.S. airports over a chaotic weekend last January.

Under the terms of the settlement, the government agreed to notify anyone overseas who was banned that they can reapply for visas with the help of a Department of Justice liaison for a three-month period. In return, the plaintiffs said they would drop all their claims.

"We are pleased with the settlement and that this chapter in the fight is done," said American Civil Liberties Union Attorney Lee Gerlent.

Gerlent said it's unclear how many people will benefit from the settlement because the government has refused to disclose the total.

There was no immediate comment from Justice Department officials.

The ACLU, along with the National Immigration Law Center and the International Refugee Assistance Project, sued after the Trump administration implemented a policy Jan. 27 that barred entry of visa-holders from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen. Among them was Hameed Khalid Darweesh, a translator who has done work for the U.S. military, who was detained at John F. Kennedy International Airport.

A federal judge blocked the ban eight days later in a ruling upheld by a circuit court. Rather than pursue an appeal, the administration said it would revise the policy.

In June, the Supreme Court found that a narrower order that excluded Iraq from the list can be enforced if those visitors lack a "credible claim of a bona fide relationship with a person or entity in the United States."