President Donald Trump on Wednesday slammed House Speaker Paul Ryan for opposing his plan to sign an executive order that would end birthright citizenship, ripping the Wisconsin Republican as someone who knows "nothing about" the issue.

"Paul Ryan should be focusing on holding the Majority rather than giving his opinions on Birthright Citizenship, something he knows nothing about!" Trump tweeted.

"Our new Republican Majority will work on this, Closing the Immigration Loopholes and Securing our Border!” he added, six days before the midterm elections Tuesday.

A spokesperson for Ryan, who is not seeking reelection, did not immediately respond to questions from NBC News about Trump’s latest remarks about him.

Paul Ryan should be focusing on holding the Majority rather than giving his opinions on Birthright Citizenship, something he knows nothing about! Our new Republican Majority will work on this, Closing the Immigration Loopholes and Securing our Border! — Donald J. Trump (@realDonaldTrump) October 31, 2018

Later Wednesday, speaking to reporters on the White House South Lawn, Trump said he would not blame Ryan if Republicans don't hold the House. When asked by NBC News' Kristen Welker why he attacked the speaker, he said, "birthright citizenship is very important, much less complex than people think."

Trump's lashing out came just one day after Ryan had rejected comments made by Trump about wanting to sign an executive order that would end birthright citizenship for the children of many immigrants to the U.S.

"You obviously cannot do that. You cannot end birthright citizenship with an executive order," Ryan, who rarely breaks with the president, told WVLK radio. "We didn't like it when Obama tried changing immigration laws via executive action, and obviously as conservatives, we believe in the Constitution."

"I'm a believer in following the plain text of the Constitution, and I think in this case, the 14th Amendment's pretty clear, and that would involve a very very lengthy Constitutional process," Ryan said Tuesday. "I believe in interpreting the Constitution as its written, and that means you can't do something like this via executive order."

Earlier Tuesday, Trump had told Axios that birthright citizenship "has to end" and that it would with an executive order.

"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, although other nations do permit it. "It's ridiculous. It's ridiculous. And it has to end."

Trump's executive order, if and when it is signed, will almost certainly face legal challenges due to the fact that birthright citizenship is rooted in the interpretation of a constitutional amendment. The "Citizenship Clause" of the 14th Amendment states that "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."

Many legal scholars believe the issue was settled by an 1898 decision of the U.S. Supreme Court involving a man born in the United States to Chinese parents who lived here legally.