President Trump said he’ll sign an executive order ending birthright citizenship for babies of non-citizens or illegal immigrants born on US soil – an action that could spark a heated constitutional battle.

“We’re the only country in the world where a person comes in and has a baby, and the baby is essentially a citizen of the United States … with all of those benefits,” Trump told “Axios on HBO” in a snippet of an interview that aired Tuesday. “It’s ridiculous. It’s ridiculous. And it has to end.”

“It was always told to me that you needed a constitutional amendment. Guess what? You don’t,” Trump continued, claiming an executive order would be sufficient to change the policy.

Questioned that such an action was in dispute, Trump replied: “You can definitely do it with an Act of Congress. But now they’re saying I can do it just with an executive order.”

Trump’s comments come as he tries to focus the debate on immigration and a caravan of Central American migrants heading to the US border as the country a week before the midterm elections reels from the massacre of 11 worshipers at a Pittsburgh synagogue and pipe-bomb mailings to a number of prominent Democrats.

The American Civil Liberties Union blasted Trump’s proposal as a political ploy.

“This is a blatantly unconstitutional attempt to fan the flames of anti-immigrant hatred in the days ahead of the midterms,” the rights group wrote on Twitter. “The 14th Amendment’s citizenship guarantee is clear. You can’t erase the Constitution with an executive order, @realDonaldTrump.”

Trump claimed that the US is the “only country in the world” where birthright citizenship exists, but more than 30 countries, including Canada and Mexico, offer it.

The concept of birthright citizenship comes from the 14th Amendment.

“All persons born or naturalized in the United States and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside,” it says.

Trump’s use of an executive order would likely put the matter in the hands of the court.

John Eastman, a constitutional scholar at Chapman University’s Center for Constitutional Jurisprudence, told Axios that the line “subject to the jurisdiction thereof” originally referred to people fully and politically allied with the US – green-card holders and citizens.

But Judge James C. Ho, who Trump appointed to Fifth Circuit Court of Appeals, said changing how the law is applied would be “unconstitutional.”

He says the line in dispute means that a person is “required to obey the orders of that court,” adding that the “test if obedience, not allegiance,” Ho wrote in an 2007 op-ed in the Los Angeles Times.

Trump’s sitdown with Axios follows an interview he did with Fox’s Laura Ingraham in which he told the thousands of migrants in a caravan heading to the US border to turn around.

“They are not coming in,” he said on “The Ingraham Angle.”

The US will also send about 5,200 active-duty troops to “harden” the border, the Pentagon announced on Monday.

They will bolster a force of about 2,000 National Guard members already dispatched to the border.

The full Axios interview will air on Sunday.