President Trump slammed House Speaker Paul Ryan on Wednesday for opposing his call for an executive order to curb birthright citizenship -- saying it’s something Ryan “knows nothing about.”

“Paul Ryan should be focusing on holding the Majority rather than giving his opinions on Birthright Citizenship, something he knows nothing about!” he tweeted. “Our new Republican Majority will work on this, Closing the Immigration Loopholes and Securing our Border!”

Trump used an interview with “Axios on HBO,” a clip of which was released Tuesday, to announce his intention to use an executive order to end the policy granting automatic citizenship to children born in the U.S. to non-citizen or illegal immigrant parents. On Wednesday, he doubled down on that claim, tweeting that it would be ended “one way or the other.”

Speaking to reporters outside the White House later Wednesday, the president said he doesn’t believe you “need a constitutional amendment” to change birth right citizenship. He said he believes it can be accomplished through a vote in Congress, or by an executive order. The president compared it to then-President Obama’s 2012 order that allowed certain people who came to the U.S. illegally as minors to be protected from immediate deportation.

“But certainly if he can do DACA, we can do this by executive order,” Trump said.

Ryan had dismissed the idea of changing birthright citizenship outright, saying in an interview Tuesday with WVLK that the 14th Amendment is “pretty clear” and an executive order wouldn't work.

“Well you obviously cannot do that,” he said. “You cannot end birthright citizenship with an executive order. We didn’t like it when [former President Barack Obama] tried changing immigration laws via executive action and obviously as conservatives we believe in the Constitution.”

Those remarks sparked Trump’s fiery response, as the president pressured the outgoing speaker to ramp up efforts to hold the House for Republicans. While the GOP remains well-positioned to hold the Senate in next week's midterms, Democrats are favored to reclaim the majority in the House. Democratic Leader Nancy Pelosi predicted this week that Democrats "will win" the House.

TRUMP VOWS BIRTHRIGHT CITIZENSHIP 'WILL BE ENDED ONE WAY OR THE OTHER' AS HILL DEBATE RAGES

The latest remarks highlight the often-troubled relationship between Trump and Ryan -- who have formed an uneasy alliance since the 2016 election. Ryan is stepping down as speaker and retiring from Congress in January.

Ryan’s dismissal of Trump’s use of an executive order appeared to be somewhat backed by Senate Judiciary Chairman Chuck Grassley, R-Iowa, who said that he will "closely review" the proposed executive order but "as a general matter, this is an issue that Congress should take the lead to carefully consider and debate."

However, Sen. Lindsey Graham, R-S.C., announced that he will be introducing legislation “to deal with the issue of birthright citizenship for children of illegal immigrants” and said it was a “magnet for illegal immigration in modern times.”

On Wednesday, Trump appeared to shift stance somewhat on how it would be achieved by avoiding saying it would be ended by executive order, while acknowledging the matter “will be settled by the United States Supreme Court.”

Fox News' Alex Pappas contributed to this report.