President Donald Trump wants the GOP to throw in the towel on immigration — for now.

The president urged congressional Republicans on Friday to "stop wasting their time" on immigration bills until after November's midterm elections. He contended that Republicans will make gains in the Senate and House, allowing them to pass "great legislation" in the next Congress.

Trump tweet: Republicans should stop wasting their time on Immigration until after we elect more Senators and Congressmen/women in November. Dems are just playing games, have no intention of doing anything to solves this decades old problem. We can pass great legislation after the Red Wave!

The president's tweets Friday morning will do nothing to inspire confidence in floundering House GOP efforts to pass immigration legislation. Amid party fractures, Republicans delayed a planned Thursday vote on a bill crafted as a compromise between conservatives and more moderate GOP lawmakers until next week. A separate, more conservative bill failed in the House on Thursday.

Following the president's tweet Friday, House Majority Leader Kevin McCarthy said Republicans would go on with the vote next week as planned.

Only on Tuesday, Trump tweeted that "now is the best opportunity ever for Congress to change the ridiculous and obsolete laws on immigration." That night, he told House Republicans he supported them "1,000 percent" in their effort to pass legislation.

Trump tweet: #CHANGETHELAWS Now is the best opportunity ever for Congress to change the ridiculous and obsolete laws on immigration. Get it done, always keeping in mind that we must have strong border security.

Trump has elevated immigration as a priority for the midterms in recent days. He focused heavily on the issue in public as his administration faced an uproar over its policy of separating migrant children from parents at U.S. borders. Trump eventually signed an executive order designed to end the practice, but some critics have questioned whether it would really stop U.S. authorities from splitting up families.

Polls and nonpartisan election handicappers signal Democrats will almost certainly pick up House seats in November. The biggest question is whether they will flip the 23 GOP-held districts to take a majority in the chamber.

Republicans appear to have an easier path to keeping or expanding their majority in the Senate. Twenty-six Democrats and independents who caucus with them face re-election this year, while only nine Republican seats are up for grabs.

The president has repeatedly argued that Democrats want to let immigration problems linger for political gain in November. He has focused on the fact that the 51 Senate Republicans need at least nine Democrats to join them to reach the 60 votes needed to pass an immigration bill in the Senate.

In one tweet Friday morning, he claimed that "the Dems are Obstructionists who won't give votes for political reasons & because they don't care about Crime coming from Border! So we need to elect more R's!"

Trump tweet: Even if we get 100% Republican votes in the Senate, we need 10 Democrat votes to get a much needed Immigration Bill - & the Dems are Obstructionists who won't give votes for political reasons & because they don't care about Crime coming from Border! So we need to elect more R's!

Democrats have disputed Trump's claim that they do not want secure borders. Senate Minority Leader Chuck Schumer tweeted Thursday that the bipartisan immigration bill he offered — which did not get through Congress — "had $40 billion for border security and would have been far more effective" than the president's proposed border wall.

Responding to a string of criticism from Trump on Thursday, House Minority Leader Nancy Pelosi said "Democrats are dedicated to securing our border, but we don't think putting children in cages is the way to do it." That refers to the images of children separated from their parents sleeping on thin mattresses within cage-like metal structures.

The immigration bill the House plans to consider next week would fund the border wall, limit legal immigration and offer an eventual pathway to citizenship for young immigrants brought to the U.S. illegally as children. Democrats have called it cruel and ridiculed the "compromise" label applied to because only Republicans drafted it.

On Thursday, Pelosi said the bill "may be a compromise with the devil, but it's not a compromise with Democrats."