Image copyright Getty Images Image caption Donald Trump and Paul Ryan have clashed on issues repeatedly

US President Donald Trump has lashed out at top Republican Paul Ryan's criticism of his calls to revoke birthright citizenship.

The term refers to the automatic right to citizenship for children born in the US, even to non-citizens.

Mr Trump said the soon-to-retire House of Representatives speaker should not be opining on "something he knows nothing about".

The president's idea has met a mixed reception from his fellow Republicans.

On Wednesday, Mr Trump took to Twitter to vent his ire at the most powerful congressional Republican.

Next week Americans go to the polls for the mid-term elections. Republican control of both houses of Congress is up for grabs.

The president also tweeted about Democrat Harry Reid, who in 1993 called for the end of the birthright policy. Mr Reid has apologised repeatedly since making those remarks.

Leaving the White House on Wednesday for a Florida rally, Mr Trump kept the focus on immigration, telling reporters the US could send as many as 15,000 military troops to the border with Mexico.

The Pentagon this week said it would deploy more than 5,000 active-duty soldiers to the southern boundary, as thousands of Central American migrants head north through Mexico.

On Tuesday, Mr Ryan, who will retire in January, challenged the president's statements on birthright citizenship, saying he "obviously" could not just end the policy.

Mr Ryan has previously clashed with the president on issues such as healthcare and immigration, and reportedly finds working with him frustrating.

"You cannot end birthright citizenship with an executive order," Mr Ryan told Kentucky-based radio station WVLK.

"We didn't like it when Obama tried changing immigration laws via executive action, and obviously as conservatives, we believe in the constitution."

Mr Trump had earlier called the birthright policy "ridiculous" and incorrectly claimed the US was the only country to offer it. In fact, a number of countries including Canada and Mexico have the same practice.

He said he would use an executive order to change the US constitution's 14th amendment, which gives citizenship to all born on US soil.

Republican Senator Lindsey Graham of South Carolina was quick to express his support for Mr Trump's plan.

Image copyright Getty Images Image caption Lindsey Graham has lately been a vocal supporter of Mr Trump's policies

In a series of tweets, Mr Graham called birthright citizenship an "absurd policy", saying he has always supported eliminating it.

Senator Ted Cruz, who is currently facing a strong challenge from Beto O'Rourke in Texas, also agreed with the president, according to the Dallas News.

But some conservatives say the president's comments have endangered Republicans in tight mid-term election races against Democrats.

And Mr Ryan was not the only Republican to shy away from changing the constitution.

Representative Carlos Curbelo, a Republican who is up for re-election in his Miami, Florida, district, tweeted that the president did not have the powers to carry out the plan.

Mike Coffman of Colorado, another Republican congressman facing a tough re-election, also called out the president.

He tweeted: "I hate to break the news to President Trump, but the Supreme Court isn't going to let him rewrite immigration law by executive fiat, nor should they.

"We have a Constitution. The President should take heed and follow it."

Utah Republican Mia Love said in a statement she has "always opposed Presidential attempts to change immigration law unilaterally".

"The 14th Amendment makes the conditions of citizenship clear: individuals born in this country are citizens," the congresswoman, who is the daughter of Haitian immigrants, said.

Image copyright EPA Image caption The US constitution guarantees citizenship to any child born on US soil

The president's critics have dismissed the move as political grandstanding ahead of the mid-terms.

Top Democrat Nancy Pelosi called Mr Trump's claim an example of "Republican's spiralling desperation to distract from their assault" on healthcare.

But Indiana Senator Joe Donnelly, a vulnerable Democrat up for re-election, opted for a more open stance, saying he would want to review any proposed legislation first.

According to a 2015 Pew Research Centre poll, 60% of Americans were against ending birthright citizenship.

Looking at party divides, however, showed that 53% of Republicans polled on the issue supported amending the constitution regarding the policy.