In seeking to limit who is entitled to "birthright citizenship," President Trump is creating a distraction through fear-mongering ahead of the midterm elections, some Democrats charged Tuesday.

Earlier, Trump told "Axios on HBO" that he intended to sign an executive order that would end "birthright citizenship" to children born in the U.S. to mothers who are in the country illegally -- setting the stage for a challenge to the 14th Amendment of the Constitution.

“How ridiculous, we’re the only country in the world where a person comes in, has a baby, and the baby is essentially a citizen of the United States for 85 years with all of those benefits,” Trump said. “It’s ridiculous. It’s ridiculous. And it has to end.”

The reaction from Democrats was swift, with some accusing Trump of using the issue to rile up his supporters ahead of next Tuesday's midterms, with control of the House and Senate on the line.

“Even as we cope with bombers and mass murderers triggered by lies about refugees and immigrants, Trump keeps going back to his comfort zone, the foundation of his presidency: Hating on brown people,” said U.S. Rep. Luis V. Gutierrez, D-Ill., adding that the president’s move seemed timed to motivate his political base to go to the polls, the Washington Times reported.

In a Tuesday appearance on "The Late Show with Stephen Colbert," House Minority Leader Nancy Pelosi, D-Calif., said the Axios interview didn't surprise her. "This is just more of the same of what he's been saying," she said, referring to Trump's remarks on the migrant caravan making its way toward the U.S. through Mexico and the separation of migrant families. "What he was saying today has no relationship to what his authority is, but that's of course not unusual."

In a tweet, Chicago Mayor Rahm Emanuel called Trump's comments "election season catnip."

"Please. I know election season catnip when I see it. The President doesn’t have this authority, but he does have an interest in dividing the country and riling up his base. This is midterm election nonsense."

The 14th Amendment, ratified in 1868, says that “all persons born or naturalized in the United States and subject to the jurisdiction thereof, are citizens of the United States.”

Trump's intention to deny automatic citizenship to some of those born in the U.S. will almost certainly draw court challenges.

Most legal experts said his plan runs afoul of the Constitution, the Washington Post reported.

House Speaker Paul Ryan, R-Wis., dismissed Trump"s remarks, saying in a radio interview in Kentucky that, “Well, you obviously cannot do that. You cannot end birthright citizenship with an executive order.”

Washington state Attorney General Bob Ferguson said Tuesday that his office will immediately sue if Trump follows through on his plan, the Seattle Times reported.

“No matter how much he may want to appeal to the alt-right, President Trump can’t alter the Constitution through executive order," said Ferguson, who is viewed as a possible 2020 gubernatorial candidate. "If he tries, we will immediately take him to court — and defeat him again."