Seattle-based US District Judge John Coughenour issued a temporary restraining order at the urging of four Democratic-led states - Washington, Arizona, Illinois and Oregon - preventing the administration from enforcing the order. Trump had signed the order on Monday, his first day back in office.
The judge, an appointee of Republican former President Ronald Reagan, dealt the first legal setback to the hardline policies on immigration that are a centrepiece of Trump's second term as president.
Trump's executive order had directed US agencies to refuse to recognise the citizenship of children born in the United States if neither their mother nor father is a US citizen or lawful permanent resident.
"I am having trouble understanding how a member of the bar could state unequivocally that this order is constitutional," the judge told a US Justice Department lawyer defending Trump's order on Thursday.
"It just boggles my mind."
President Donald Trump's order curbs citizenship rights of children of parents who are not American. (AP PHOTO)
The states argued that Trump's order violated the right enshrined in the citizenship clause of the US Constitution's 14th Amendment that provides that anyone born in the United States is a citizen.
"I've been on the bench for over four decades. I can't remember another case where the question presented is as clear as this one. This is a blatantly unconstitutional order," Coughenour said of Trump's policy.
Coughenour's order, announced following a short hearing in a packed courtroom with other judges watching, prevents Trump's policy from being enforced nationwide for 14 days while the judge considers whether to issue a long-lasting preliminary injunction.
Under Trump's order, any children born in the United States after February 19 whose mother and father are not American citizens or lawful permanent residents would be subject to deportation and would be prevented from obtaining Social Security numbers, various government benefits and the ability as they get older to work lawfully.
"Under this order, babies being born today don't count as US citizens," Washington state Assistant Attorney General Lane Polozola, referring to Trump's policy, told the judge during a hearing in a packed courtroom.
Justice Department lawyer Brett Shumate argued that Trump's action was constitutional and called any judicial order blocking it "wildly inappropriate". But before Shumate had finished responding to Polozola's argument, Coughenour said he had signed the temporary restraining order.
The Justice Department plans to file papers next week to urge the judge to not issue a longer injunction, Shumate said. The department said it had no immediate comment, and the White House did not immediately respond to requests for comment.
The Justice Department says the order is integral to addressing the "broken" US immigration system. (AP PHOTO)
More than 150,000 newborn children would be denied citizenship annually if Trump's order is allowed to stand, according to the Democratic-led states.
Since Trump signed the order, at least six lawsuits have been filed challenging it, most of them by civil rights groups and Democratic attorneys general from 22 states.
Democratic state attorneys general have said that the understanding of the Constitution's citizenship clause was cemented 127 years ago when the US Supreme Court ruled that children born in the United States to non-citizen parents are entitled to American citizenship.
The 14th Amendment was adopted in 1868 following the US Civil War and overturned the Supreme Court's notorious 1857 Dred Scott decision that had declared that the Constitution's protections did not apply to enslaved Black people.
In a brief filed late on Wednesday, the Justice Department called the order an "integral part" of the president's efforts "to address this nation's broken immigration system and the ongoing crisis at the southern border".
A total of 36 of Trump's Republican allies in the US House of Representatives on Tuesday separately introduced legislation to restrict automatic citizenship to only children born to citizens or lawful permanent residents.