Federal judges in Hawaii and Maryland have blocked President Donald Trump's temporary refugee and travel ban from going into effect.

Judge Derrick Watson of the Hawaii District Court "enjoined" the enforcement of "Sections 2 and 6 of the Executive Order across the Nation" on Wednesday, just before the order was scheduled to be effective.

"Enforcement of these provisions in all places, including the United States, at all United States borders and ports of entry, and in the issuance of visas is prohibited, pending further orders from this Court," the decision stated.

President Trump's revised executive order – his first one was struck down by the Ninth U.S. Circuit Court of Appeals – kept a 120-day halt on refugee admissions, although the indefinite ban on Syrian refugees was left out of the new order.

The order capped the number of refugees to be admitted into the U.S. in fiscal year 2017 at 50,000, far less than the 85,000 refugees admitted in the previous year and the 110,000 mark originally set for FY 2017 by the Obama administration.

Also left out of the order was a prioritized refugee admissions status for persecuted religious minorities.

Iraq was omitted from the list of six countries from which many foreign nationals would be banned from entering the U.S. – Iran, Somalia, Yemen, Syria, Libya, and the Sudan.

Those who were "outside the United States on the effective date of this order" – March 16 – and had not obtained valid visas by that date, or did not have valid visas by 5 p.m. EST on the date of the original executive order, Jan. 27, would be barred from entry into the U.S. unless they met certain exceptions, like those traveling on diplomatic visas, those granted asylum, or refugees who had already been admitted into the U.S.

Hawaii had sued President Trump over the travel ban, charging that it unfairly discriminated against Muslims seeking entry into the U.S. Washington, California, Massachusetts, Oregon, and New York have also sued the administration.

More in US

The district court ruled that the state made a strong enough case that the order violated the Establishment Clause in restricting travel from six Muslim-majority countries, and that the state's university system and tourism industry would suffer significant injury from the travel ban.

Thus, Judge Watson temporarily barred the travel ban from going into effect, which it was to do at midnight EST on Thursday.

According to the court, the state had claimed "that the Executive Order subjects portions of the State's population…to discrimination in violation of both the Constitution and the INA, denying them their right, among other things, to associate with family members overseas on the basis of their religion and national origin."

Hawaii had stated in its complaint that "Muslims in the Hawai'i Islamic community feel that the new Executive Order targets Muslim citizens because of their religious views and national origin. Dr. Elshikh believes that, as a result of the new Executive Order, he and members of the Mosque will not be able to associate as freely with those of other faiths."

Dr. Elshikh, an imam of the Muslim Association of Hawaii, claimed injury because his mother-in-law, a Syrian national, had applied for a visa but feared her case would not move forward because of the travel ban.

"These injuries are sufficiently personal, concrete, particularized, and actual to confer standing in the Establishment Clause context," Watson ruled.