NEW York (Reuters) - Muslim immigrants and an advocacy group filed a fresh lawsuit against President Donald Trump’s latest version of a travel ban that placed indefinite restrictions on the entry of citizens from eight countries to the United States.

FILE PHOTO - Protesters hold signs against U.S. President Donald Trump's limited travel ban, approved by the U.S. Supreme Court, in New York City, U.S. on June 29, 2017. REUTERS/Joe Penney/File Photo

The suit filed late Monday in federal court in Maryland challenges a Sep. 24 Presidential proclamation limiting travel from Iran, Libya, Syria, Yemen, Somalia, Chad and North Korea. Certain government officials from Venezuela were also barred.

Six individual plaintiffs who are U.S. citizens or lawful permanent residents with Iranian relatives who could be blocked from coming to the United States, along with the group Iranian Alliances Across Borders, claim the ban violates an immigration law that prevents discrimination based on nationality.

The complaint says that the majority of the people affected by the ban are Muslim and point to Trump’s campaign promises for “total and complete shutdown of Muslims entering the United States.” The suit says North Korea and Venezuela were added so Trump could “cloak this latest iteration of his Muslim ban in religiously neutral garb by invoking a national security review.”

The latest ban goes fully into effect on Oct. 18 and could affect tens of thousands of potential immigrants and visitors. Trump has argued that the restrictions are necessary to tighten security and prevent terrorist attacks.

Department of Justice spokesman Ian Prior said the agency “will continue to vigorously defend the President’s inherent authority to keep this country safe.”

Trump’s proclamation followed on two earlier temporary travel bans against some of the same countries, after the government did a global review of information sharing and security screening protocols.

The first ban issued soon after Trump took office in January targeted seven countries but was blocked by courts following a hasty implementation and chaotic scenes at airports.

The second ban signed in March targeted six countries and was also blocked by lower courts. It was then partially revived by the Supreme Court in June. The third ban, with no clear end date, came out when the temporary measures expired.

On Friday the American Civil Liberties Union said it was seeking to amend an existing lawsuit in Maryland federal court filed against the previous March 6 ban to include the latest proclamation.

Legal experts say the new restrictions are likely on more solid footing, in part because they followed a detailed review by federal agencies.