U.S. President Donald Trump urged Republican lawmakers on Friday to drop their efforts to pass comprehensive immigration legislation until after the November elections, which he hoped would bring more part members into Congress.

Trump, faced with a public outcry over his policy that’s separated children from their migrant parents at the U.S. border with Mexico, tried to refocus the immigration debate on Congress in a series of early posts on Twitter.

Despite Republican control of both the House of Representatives and the Senate, the party’s slim 51-49 majority in the latter chamber makes some Democratic support necessary to pass most legislation. “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. The U.S. House of Representatives 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.

The bill was defeated in a 231-193 vote, with 41Republicans 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. However, Trump’s latest tweets could gut that effort. “Game over,” said Representative Mark Sanford, a

Republican critic of Trump who came under fire from the president before losing his primary race this month. “It takes the wind out of the sails in what might have been a fairly productive weekend in terms of looking for a compromise,” Sanford told CNN. “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.”

Both 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 proposed along the border with Mexico and also reduce legal migration. 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 in order to prosecute parents for crossing the border illegally.

Trump backed down on Wednesday, signing an executive order to keep families together in detention during immigration proceedings.

But 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.

The U.S. military has been asked to get ready to house up to20,000 immigrant children, officials said on Thursday, amid confusion over Trump’s efforts to roll back the policy of separating children from their parents. No decision on this has been made yet.