Donald Trump put the Republican speaker of the House on blast on Wednesday morning after the outgoing congressman said the president does not have the legal authority to end birthright citizenship.

Trump directed Rep. Paul Ryan, who's retiring this year regardless of what happens next Tuesday, to butt out of the citizenship debate and worry instead about defending Republican territory.

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

Donald Trump put the Republican speaker of the House on blast on Wednesday morning after the outgoing congressman said the president does not have the legal authority to end birthright citizenship

Trump directed Rep. Paul Ryan, who's retiring this year regardless of what happens next Tuesday, to butt out of the citizenship debate and worry instead about defending Republican territory

After Trump claimed in a Tuesday interview that he would end birthright citizenship for illegal immigrants, Ryan told a Kentucky radio station that the White House would have to change the Constitution, which requires the consent of Congress, to revoke the right that's extended to all United States citizens.

'You obviously cannot do that. You cannot end birthright citizenship with an executive order,' Ryan said.

The Wisconsin congressman also noted that Republicans 'didn’t like it when Obama tried changing immigration laws via executive action, and obviously as conservatives we believe in the Constitution,' as he revisited the controversy that led to the creation of the now-defunct Deferred Action for Childhood Arrivals program.

Trump's administration declared the immigration policy unconstitutional, because it originated from the executive branch and not Congress and declined to defend it in court.

Lawmakers agree broadly that illegal immigrants who came to the United States as children should be allowed to stay, but they never reached an compromise that crystallizes the policy and implements the president's immigration priorities.

With the mid-term election that will decide the make-up of the House and the Senate a week out, Trump claimed Tuesday that he could get rid of birthright citizenship for the children of illegal immigrants who are born in the U.S.

'It was always told to me that you needed a constitutional amendment. Guess what? You don't,' Trump told Axios during an interview that will air in full on Sunday evening.

Legal scholars, including top aide Kellyanne Conway's husband George and Laurence Tribe, immediately sided against him. So did Ryan, a Wisconsin Republican who has clashed in the past with Trump over his bombastic rhetoric.

'As a conservative, I'm a believer in following the plain text of the Constitution, and I think in this case the 14th Amendment is pretty clear, and that would involve a very, very lengthy constitutional process,' Ryan said. 'But where we obviously totally agree with the president is getting at the root issue here, which is unchecked illegal immigration.'

On Tuesday evening after Trump's declaration, former House Speaker Nancy Pelosi giddily predicted that her party would win the lower chamber during a conversation with 'Late Show' host Stephen Colbert.

'Let me say this. Up until today, I would've said, "If the election were held today, we would win," ' Pelosi said. 'What now I'm saying is, "We will win." '

Pelosi told Colbert that the founders would be shocked to see Trump 'abuse' the Constitution after taking an oath to protect it. She framed the upcoming election as 'a check and balance on this president.'

Trump refused to climb down from his position on Wednesday morning. He insisted on Twitter that the U.S. Constitution doesn't grant automatic citizenship to every child born inside the country's borders.

He predicted the Supreme Court will ultimately decide the question, reintroduced the controversial term 'anchor baby' into the national debate and cited a retired Democratic Senate leader to support his argument.

'So-called Birthright Citizenship, which costs our Country billions of dollars and is very unfair to our citizens, will be ended one way or the other,' Trump tweeted.

'It is not covered by the 14th Amendment because of the words "subject to the jurisdiction thereof", the president added, before cutting his message off in mid-sentence and pausing for nearly an hour before continuing.

'Harry Reid was right in 1993, before he and the Democrats went insane,' Trump claimed, referring to a now-infamous Senate floor speech in which Reid, a Nevada Democrat and future Senate majority leader, blasted the practice of birthright citizenship.

Trump tweeted Wednesday that the Constitution's Fourteenth Amendment only applies to people who aren't 'subject to the jurisdiction' of the U.S. – meaning in his view that babies born to people in the country illegally don't enjoy its benefits

The president cited Democrat Harry Reid, who was a Nevada senator in 1993 when he said 'no sane country' would grant automatic citizenship to babies born to illegal immigrant mothers

Hundreds of thousands of babies are born each year to illegal immigrants parents in the United States, and the conventional reading of the 14th Amendment gives them all citizenship rights –– something Canada is the only other First World country to offer

The senator who retired after the last election said in a 1993 speech: 'If making it easy to be an illegal immigrant isn't enough, how about offering a reward for being an illegal immigrant? No sane country would do that, right? Guess again.'

'If you break our laws by entering our country without permission to give birth to a child, we reward that child with U.S. citizenship and guarantee a full access to all public and social services this society provides, and that's a lot of services. Is it any wonder that two-thirds of the babies born at taxpayer expense in county-run hospitals in Los Angeles are born to illegal alien mothers?'

In a typical year, about 250,000 illegal immigrants give birth in the U.S.

Conservatives have long complained about their births' long-term impacts on welfare systems, education costs and other drivers of the national debt.

Legal scholars argue that like it or not, the 14th Amendment protects the rights of anyone born in the United States under the law. The policy stems from an 1898 Supreme Court ruling, however, the high court has never ruled directly on the whether the amendment covers children born to people living in the U.S. illegally.

Laurence Tribe, a constitutional law professor at Harvard University and a fixture on cable news, said in a Wednesday tweet that Conway's husband and Katyl are correct on the law and all reputable legal scholars agree - Trump cannot highhandedly end birthright citizenship for a class of people.

'It’s an understatement to say there’s a consensus among experts that Trump’s promise to end birthright citizenship for babies born in the USA to undocumented mothers is a legally untenable political stunt. No respected currently active scholar disagrees,' he asserted.

Trump said he'll take his case all the way to the nation's highest court in his tweets on Wednesday.

'Don’t forget the nasty term Anchor Babies,' he added. 'I will keep our Country safe. This case will be settled by the United States Supreme Court!'

'If making it easy to be an illegal immigrant isn't enough, how about offering a reward for being an illegal immigrant? No sane country would do that, right? Guess again,' Nevada Democratic Sen. Harry Reid said in 1993, years before he became the Senate majority leader

The 14th Amendment of the Constitution, written in 1868, states that '[a]ll persons born or naturalized in the United States, and subject to the jurisdiction thereof,' are U.S. citizens.

Debate has raged for 150 years about whether citizens of foreign countries are 'subject to the jurisdiction' of the United States. Some legal scholars believe that phrase only refers to hostile occupying armies and foreign diplomatic officials.

Republican leaders are split on whether Trump can end the tradition of birthright citizenship with an executive order, as he said in an interview Monday that he intends to do.

The vice president backed Trump up on Tuesday while the speaker of the House took the opposite side of the debate.

House Speaker Paul Ryan insisted Tuesday that the White House can't use an executive order to change the government's interpretation of the 14th Amendment to the Constitution

Trump, shown leaving the White House on Tuesday with first lady Melania Trump, has given his anti-illegal-immigrant base some new red meat with the proposal, just a week before the midterm elections

Vice President Mike Pence insisted Tuesday that there's nothing unconstitutional about Trump declaring that an babies born to illegal immigrants in the U.S. will no longer automatically become American citizens.

'We all know what the 14th Amendment says,' Pence told Politico during an on-stage interview. 'We all cherish the language of the 14th Amendment.'

'But the Supreme Court of the United States has never ruled on whether or not the language of the 14th Amendment, "subject to the jurisdiction thereof," applies specifically to people who are in the country illegally,' Pence argued.

Trump, who has long been critical of the practice, told Axios in an interview on Monday: '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. It's ridiculous. It's ridiculous. And it has to end.'

South Carolina Republican Sen. Lindsey Graham, a Trump ally on most issues but not always immigration questions, said in a series of tweets that he welcomes a change.

'Finally, a president willing to take on this absurd policy of birthright citizenship,' he said on Twitter. 'I’ve always supported comprehensive immigration reform – and at the same time – the elimination of birthright citizenship.'

'The United States is one of two developed countries in the world who grant citizenship based on location of birth. This policy is a magnet for illegal immigration, out of the mainstream of the developed world, and needs to come to an end,' he stated.

Vice President Mike Pence said Tuesday that the Supreme Court has never ruled on whether the 14th Amendment applies to illegal immigrants; South Carolina Republican Sen. Lindsey Graham tweeted that he'll introduce legislation mirroring Trump's executive order

Graham sent a flurry of tweets agreeing with Trump's approach and offering to ingtroduce a bill that would codify it into law

Graham also said he would 'introduce legislation along the same lines as the proposed executive order from President.'

Trump insists he can change the way the 14th Amendment is interpreted by the federal government without amending the Constitution itself, and can do it through an executive order.

Several Republicans running for president in 2016, including Trump, former Florida Gov. Jeb Bush and Kentucky Sen. Rand Paul, argued at the time that the phrase 'subject to the jurisdiction' refers only to people with a legal right to be in the country.

In a preview of an HBO documentary with Axios scheduled to air on Sunday, Trump says, 'You can definitely do it with an Act of Congress. But now they're saying I can do it just with an executive order.'

'It's in the process. It'll happen ... with an executive order.'

The president first articulated his position in August 2015, painting a mental picture for a Fox News Channel audience.

'What happens is, they're in Mexico, they're going to have a baby, they move over here for a couple of days, they have the baby,' he said then, adding: 'I don't think they have American citizenship, and if you speak to some very, very good lawyers, some would disagree. But many of them agree with me: You're going to find they do not have American citizenship.'

Trump's move came a week before midterm elections and after a second migrant caravan (pictured) crossed into Mexico on Monday

Some attorneys, he insisted, had advised him that 'It’s not going to hold up in court, it’s going to have to be tested.'

In the 2016 race the president also denied that 'anchor babies' is a derogatory term and said he'd keep using it to describe the the children of illegal immigrants who are born in the United States.

Some scholars agree that the 14th Amendment was never intended to give illegal immigrants' children citizenship and has been misapplied for decades.

Trump could change the application with an executive order, they say, limiting birthright citizenship only to the children born of legal permanent residents.

Michael Anton, a former national security official for Trump, wrote in The Washington Post that an executive order could 'specify to federal agencies that the children of non-citizens are not citizens.'

But others, such as Judge James Ho, who was appointed by Trump to Fifth Circuit Court of Appeals, insist that changing how the 14th Amendment is applied would be 'unconstitutional.'

Only about 30 countries, including Canada, guarantee some sort of birthright citizenship, known as 'jus soli' (right of the soil).

Others grant citizenship based on the principle of 'jus sanguinis' (right of the blood) – where children can only inherit citizenship from their parents, not their birthplace.

India abolished jus soli in 2004 when thousands of illegal immigrants entered the country from Bangladesh.

The Pew Hispanic Center estimates that approximately 7.5 per cent of all births in the U.S. - about 300,000 per year- are to illegal immigrants.

The Center says around 4.5 million American citizens under age 18 were born to illegals residents.