By Doina Chiacu and Richard Cowan

WASHINGTON (Reuters) - President Donald Trump urged Republican lawmakers on Friday to drop their efforts to pass comprehensive immigration legislation until after the November elections, sending mixed signals to his party amid an ongoing crisis over his border policies.

Trump, faced with a public outcry over his policy that separated children from their migrant parents at the U.S. border with Mexico, has gone back and forth on ways to solve the country's immigration problems, which he blames on Democrats.

By seeking to keep that blame on the opposition party, he is hoping to galvanize support from his base for midterm elections that could swing the balance of power on Capitol Hill.

"Elect more Republicans in November and we will pass the finest, fairest and most comprehensive Immigration Bills anywhere in the world," Trump said on Twitter.

"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!" he said.

All 435 House seats and a third of the 100-member Senate will be up for grabs in November. Democrats are hoping discontent with Trump’s policies, including on immigration, will help them pick up the 23 seats needed to recapture a majority in the House. Their task is more daunting in the Senate, where they need to pick up only two seats for a majority but are defending 26 seats to just nine held by Republicans.

Trump bowed to intense pressure on Wednesday and signed an order ending the separation of children from their families while parents are prosecuted for crossing the border illegally, which had caused uproar at home and abroad. He said then he wanted Congress to pass a more comprehensive immigration bill.

The House on Thursday rejected a bill favored by conservatives that would have halted the practice of splitting up families and addressed a range of other immigration issues.

Story continues

The bill was defeated in a 231-193 vote, with 41 Republicans joining the opposition. The House also postponed, likely until next week, a vote on a more moderate bill in order to try to drum up more support.

Trump's latest tweets could gut that effort.

"Game over," said Representative Mark Sanford, a Republican critic of Trump who came under withering attack from the president before losing his primary race this month.

"Without the president having legislators' backs, there's no way they're going to take the risks that would be inherent in a major reform bill," Sanford told CNN.

Republican Representative Ileana Ros-Lehtinen, who represents a majority Hispanic district in Florida and is not running for re-election, said that Trump’s tweets amount to “schizoid policy making.”

House Majority Leader Kevin McCarthy insisted the bill would be brought to the floor, where it faced an uncertain future and almost certain rejection in the Senate, where Republicans' slim 51-49 majority makes some Democratic support necessary to pass most legislation.

Both Republican immigration bills had received backing from Trump but were rejected by Democrats and immigration advocacy groups as too harsh. They would fund a wall Trump has long proposed along the border with Mexico and would also reduce legal migration.

CONFUSION OVER SEPARATIONS

As Republicans in Congress struggled to reach consensus on immigration legislation, the White House has grappled with fierce criticism in recent weeks over the policy that has separated more than 2,300 children from their families.

Despite his concession on Wednesday, Trump suggested on Friday that some of the wrenching tales that have emerged from the border were fabricated by Democrats, tweeting, "We cannot allow our Country to be overrun by illegal immigrants as the Democrats tell their phony stories of sadness and grief, hoping it will help them in the elections."

The White House criticized Democrats and journalists for focusing on a picture of a girl who cried while her mother was searched near the border. Spokeswoman Sarah Sanders tweeted: "It’s shameful that dems and the media exploited this photo of a little girl to push their agenda. She was not separated from her mom. The separation here is from the facts."

Following the president's order to keep families together in detention during immigration proceedings, it remained unclear how and when those children would be reunited with their parents, and where families would be held while the parents face criminal charges.

It was also not clear if the government would keep prosecuting cases against people caught crossing the border illegally. It was the administration's policy of zero tolerance - announced in April - that led to blanket prosecutions, including of adults traveling with children.

Officials said on Thursday the U.S. military has been asked to get ready to house up to 20,000 immigrant children.

The U.S. military has been asked that the facilities be ready as early as July and be available until the end of the year, according to a Pentagon notification to Congress.

The notification said the Department of Health and Human Services or its contractors would provide all care for the children, from transportation and supervision to meals and clothing.

Trump sought to make the case for his immigration clampdown at an event on Friday with members of so-called Angel Families who had a loved one killed by someone who had entered the United States illegally.

"These are the stories that Democrats and people that are weak on immigration, they don't want to discuss," he said.

(Reporting by Doina Chiacu and Richard Cowan in Washington; Additional reporting by Idrees Ali, Amanda Becker, Steve Holland and Justin Mitchell; Writing by Jeff Mason and Doina Chiacu; Editing by Frances Kerry and James Dalgleish)