Both bills include language to end the controversial White House policy of separating migrant parents from their children at the border. The children are being held separately from parents who are being prosecuted under the administration's "zero-tolerance" policy for illegal border crossings.
Under the current policy, all unlawful crossings are referred for prosecution - a process that moves adults to the custody of the U.S. Marshals Service and sends many children to facilities run by the Department of Health and Human Services.
Trump administration officials cited that court case when deciding to separate children from parents and guardians going through criminal proceedings.
Almost 2,000 children were separated from their families over a six-week period in April and May after Attorney General Jeff Sessions announced the new "zero-tolerance" policy that refers all cases of illegal entry for criminal prosecution.
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.
"It's been tough for Democrats to bring the issue of compassion out on a national scale" when talking about immigration, said James Aldrete, a Democratic campaign consultant in Texas. They are demanding that the administration act to keep migrant families together.
As the immigration story becomes a national flashpoint, Trump has been watching the TV coverage with increasing anger, telling confidants he believes media outlets are deliberately highlighting the worst images - the cages and screaming toddlers - to make him look bad. Kansas GOP Sen. Pat Roberts said he is "against using parental separation as a deterrent to illegal immigration". Privately, Trump has insisted he is right to push forward with a practice that has drawn outcry from across the political spectrum.
Led by New Mexico Attorney General Hector Balderas, 21 top state prosecutors from California to MA sent a letter to U.S. Attorney General Jeff Sessions and Homeland Security Secretary Kirstjen Nielsen on Tuesday, calling the policy inhumane and draconian. Her office said she wanted to "lend support and hear more on how the administration can build upon the already existing efforts to reunite children with their families".
The bill faces strong headwinds as it is opposed by Democrats, who object to another provision that would cut legal immigration levels, and conservative Republicans who are backing a rival bill that takes a harder line on immigration.
Trump last week upended Republican efforts to negotiate the compromise bill, saying he would not support it. Hours after throwing the House GOP caucus into turmoil, the White House issued a statement saying, in effect, that the president had been confused.
The compromise bill in the House shifts away from the nation's longtime preference for family immigration to a new system that prioritizes entry based on merits and skills.
The rejected conservative bill would have granted no pathway to citizenship for young "Dreamers" who arrived in the country illegally as children, curbed legal immigration and bolstered border security.
To address the rise of families being separated at the border, the measure proposes keeping children in detention with their parents, undoing 2-decade-old rules that limit the time minors can be held in custody. The Alabama-based Southern Poverty Law Center said the order didn't go almost far enough.
Faced with the prospect of gridlock in the House, senators appear willing to take matters into their own hands. Sixty votes are needed to end filibusters.
"I don't think the answer to family separation is to not enforce the law".
The almost 300-page compromise measure creates a pathway to citizenship for the young immigrants known as Dreamers, who have been living in the United States illegally since childhood. Ted Cruz, R-Texas, that would keep families together. Multiple detainees say the guards stripped them of their clothes and strapped them to chairs with bags placed over their heads. Democrats brushed aside that pressure.
Speaking at the small business event in Washington, the President said the separation policy is "a result of Democrat supported loopholes in our federal laws" that he said could be easily changed.
"We have a chance", said Carlos Curbelo, of Florida. That immigration bill was debated, and defeated, in a vote earlier Thursday, clearing the way for the farm bill to be reconsidered. But the White House signaled it would oppose any narrow fix aimed exclusively at addressing the plight of children separated from their parents under the immigration crackdown.
Peter Schey, class-appointed counsel in the Flores case, said Wednesday there was nothing in the agreement that prevents Homeland Security officials from detaining children with their parents, "as long as the conditions of detention are humane and the child remains eligible for release, unless the child is a flight risk, or a danger to herself or others, or the child's parent does not wish the child to be released".
"What we are seeing is a pattern of using children as political pawns", she said, referring to Republican manoeuvring on health care before approving funding for the Children's Health Insurance Program and the GOP's failure to secure any kind of fix for the young "Dreamer" immigrants in the USA illegally.