U.S. District Court Judge Theodore Chuang in Maryland on Monday heard arguments for and against President Donald Trump's new travel ban, announced on Sept. 24 that is set to take effect on Wednesday. It indefinitely limits travel from Iran, Libya, Syria, Yemen, Somalia, Chad and North Korea. Certain government officials from Venezuela were also barred.

All of those countries except Chad, North Korea and Venezuela were included in two earlier temporary versions of the travel ban, which Trump's opponents said were thinly veiled attempts to fulfill his campaign pledge of a "total and complete shutdown of Muslims entering the United States."

Chuang struck down an earlier iteration of the ban, which was only partially restored by the U.S. Supreme Court in June.

The court heard arguments on whether to block implementation of the ban from three overlapping cases brought by the International Refugee Assistance Project, Iranian Alliances Across Borders, the Council on American-Islamic Relations and other groups. The lawyers from the various organizations traded off answering Chuang's questions.

An attorney from the American Civil Liberties Union, Omar Jadwat, argued that the new version is a "a bigger, tougher version of the same ban" that Trump originally wanted.

The groups say the measures violate the U.S. Constitution because they discriminate against Muslims and also violate immigration law that prohibits banning people based on nationality.

Trump has argued that the restrictions are necessary to tighten security and prevent terrorist attacks.

The third ban came in the form of a presidential proclamation after the government conducted a review of information sharing and security screening protocols in countries around the world. Legal experts say the new restrictions are likely on more solid footing because of the more thorough process involving many agencies.

"There is not a shred of evidence, not a shred of evidence, that the Department of Homeland Security, the acting Secretary for the Department of Homeland Security, the Secretary of State, or any of their subordinates, has any animus" toward Muslims, said Hashim Mooppan, the attorney representing the government in court.

Chuang said he would rule later on whether to grant the challengers' request for an injunction.

On Friday, in a separate case against the ban in Hawaii, the government said a report detailing the recommendations for the new restrictions is classified and can only be viewed by the judge in a secure setting.

The government said in its court filing that the travel bans "encourage the countries to work with the United States" to address inadequacies in their security vetting "so that the restrictions and limitations imposed by this proclamation may be relaxed or removed as soon as possible."

The proclamation "serves what is indisputably a legitimate goal," Mooppan said in court. (Reporting by Yeganeh Torbati in Greenbelt; Additional reporting by Mica Rosenberg in New York; Editing by Jonathan Oatis)