Members of Congress are set to vote on new US immigration measures but President Donald Trump has suggested Republicans’ plans could be doomed.

The House of Representatives will vote on a Republican immigration bill aimed at halting the taking of immigrant children from parents being detained for illegally entering the US.

But the measure has seemed unlikely to pass due to opposition from some conservative Republicans as well as Democrats, and Mr Trump’s remarks could complicate party leaders’ efforts to round up votes.

“What is the purpose of the House doing good immigration bills when you need 9 votes by Democrats in the Senate, and the Dems are only looking to Obstruct (which they feel is good for them in the Mid-Terms),” Mr Trump tweeted. “Republicans must get rid of the stupid Filibuster Rule-it is killing you!”

In the unlikely event that the House approves the legislation, it seemed certain to go nowhere in the Republican-run Senate, where Democrats have enough votes to use a filibuster — procedural delays — to kill it. It takes 60 votes to end filibusters.

On Wednesday, Mr Trump made a U-turn and took executive action aimed at curbing the separation of families.

His order seemed to stem some of the urgency for Congress to act. But House leaders were still pulling out the stops to bring reluctant Republicans on board in the hope of resolving broader immigration issues ahead of the November mid-term election.

Passage of the bill was always a long shot but failure may now come at a steeper price as Republicans — and Mr Trump — have raised expectations that, as the party in control of Congress and the White House, they can fix the nation’s long-standing immigration problems.

The outcome remains uncertain despite a frenzied effort to pull in the final votes. House Speaker Paul Ryan took two dozen wavering lawmakers to the White House so Mr Trump could cajole them into supporting the bill.

Attorney General Jeff Sessions and Homeland Security Secretary Kirstjen Nielsen trekked to the Capitol to meet privately with groups of Republican lawmakers. Ahead of voting on Thursday, the results of the outreach were mixed.

“We have a chance,” said Carlos Curbelo, of Florida. “It won’t be easy.”

Joe Wilson, of South Carolina, announced he would support the legislation after meeting Mr Trump, who he said was persuasive.

But Lou Barletta, who is running for Senate in Pennsylvania, told Mr Trump at the meeting he would have to remain a no vote for a bill that many conservatives consider to offer amnesty.

The bill offers a potential pathway to citizenship to many young immigrants who arrived in the US illegally as children but also provides money for Mr Trump’s proposed border wall with Mexico.

The House bill is a compromise between the conservative and moderate factions that dragged on for several weeks.

The House will also vote on a more hard-line immigration proposal favoured by conservatives. It is expected to fail.

The nearly 300-page compromise measure creates a pathway to citizenship for the young immigrants known as Dreamers, who have been living in the US illegally since childhood.

It provides $25 billion Mr Trump wants for his promised border wall with Mexico and it revises the longstanding preference for family visas in favour of a merit system based on education level and work skills.