Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

NEW YORK — The government must release to civil rights lawyers the names of approved refugees, valid visa holders and other legal travelers subjected to Republican President Donald Trump's travel ban in the day after a judge first ruled against it last month, a New York judge said Tuesday.

U.S. District Judge Carol Bagley Amon in Brooklyn said the names must be turned over by late Thursday afternoon, less than a day before she's scheduled to preside over a hearing on the issue.

The list must include legal travelers from seven predominantly Muslim nations whose residents are subjected to Trump's executive order, the judge wrote.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In her order, Amon attempted to define an earlier order by another judge that required the government to release names to civil rights lawyers who complained that the government had turned away approved refugees, valid visa holders and legal travelers from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen after Trump signed the order on Jan. 27.

Civil rights lawyers have said it was difficult to identify those who were turned away without a list provided by the government.

Amon said the list must encompass those subjected to the executive order from Jan. 28 at 9:37 p.m., after a Brooklyn judge ruled against aspects of the ban, to 11:59 p.m. on Jan. 29.

The ban has since been more broadly blocked by a Washington state judge, and Trump has promised to issue a revised order soon, saying it's necessary to keep America safe. With the agreement of lawyers on both sides, Amon let the Brooklyn order against the ban expire on Tuesday with the understanding that it would be reinstated automatically if the Washington order against the January executive order is lifted.

In court papers last week, the government said it had identified 44 people from the seven countries subject to the ban who were found at U.S. airports to be inadmissible to the United States on Jan. 27 and 28. It said each of them voluntarily withdrew his or her application for admission into the United States and returned to a foreign destination.

Protesters rally during a demonstration against Trump's travel restrictions at John F. Kennedy International Airport on Jan. 28 in New York. Stephanie Keith / Getty Images

The government said 24 of them have traveled back and been admitted into the United States.

The government said it also had identified 97 people who were denied entry to the U.S. at land border ports of entry or preclearance locations abroad. It said 14 of them have since returned and been admitted to the United States.

A Department of Justice lawyer and a government spokeswoman declined to comment Tuesday.

Lee Gelernt, a lawyer with the American Civil Liberties Union, said lawyers are "pleased that the judge has recognized that we are entitled to the names."

He added: "If they have the list of people, let's bring them back."