House Speaker Paul Ryan said Tuesday he doesn't believe President Trump will be able to end birthright citizenship in the United States by issuing an executive order, a step Trump said he was considering.

"You obviously cannot do that. You cannot end birthright citizenship with an executive order," Ryan, R-Wis., said in an interview with WVLK, a station based in Lexington, Ky.

Many have argued Trump can't undo birthright citizenship that easily because that right is in the Constitution, which would have to be amended. Regardless, Ryan said it would be hypocritical for conservatives to back Trump's approach after complaining about former President Barack Obama, who used executive orders and actions to push his immigration agenda through after Congress refused to act.

[Opinion: Ending birthright citizenship would be as unconstitutional as it is unproductive]

Under Obama, the Department of Homeland Security created the Deferred Action for Childhood Arrivals DACA program, which provides people who are illegally residing in the country and arrived before the age of 18 work permits and freedom from deportation. The program has accepted 700,000 enrollees since 2012, but the Trump administration rescinded it in Sept. 2017, saying it was illegitimate because only Congress could determine immigration levels, not the executive branch.

"We didn’t like it when Obama tried changing immigration laws via executive action, and obviously as conservatives we believe in the Constitution," Ryan said Tuesday. "I think in this case the 14th Amendment is pretty clear, and that would involve a very, very lengthy constitutional process. But where we obviously totally agree with the president is getting at the root issue here, which is unchecked illegal immigration."

Although Republicans do not agree with Trump's proposed method, Ryan said they are in agreement that certain laws need a "smarter, faster solution" to "crack down on illegal immigration."

The House and Senate have had GOP majorities through Trump's first 21 months in Congress.

The U.S. is one of 30 countries out of the total 194 that recognize a baby born within its borders as a citizen even if his or her parents are non-citizens, whether by a parent on a temporary visa or illegally in the country.