President Barack Obama has urged the leaders of three Central American countries to work with him to stem the flow of child migrants who have surged across the US border, warned that most of them would not be allowed to stay.

In a White House meeting with the leaders of Guatemala, Honduras and El Salvador, Obama said his administration had compassion for the children, but not many would qualify for humanitarian relief or refugee status.

The meeting came as Obama struggles to contain a border crisis triggered by the tens of thousands of children who have crossed the Texas border with Mexico in recent months.

Many of the migrants have fled poverty and crime at home, overwhelming border resources and putting election-year pressure on Obama to resolve it.

"There may be some narrow circumstances in which there is a humanitarian or refugee status that a family might be eligible for," Obama said after talks with the leaders.

"But I think it's important to recognise that that would not necessarily accommodate a large number."

Obama also said it is important to find solutions "that prevent smugglers from making money on families that feel

desperate" and that make a dent in poverty in Central America.

He said he would like to improve the US legal immigration system in a way that "makes this underground migration system less necessary".

Voting bloc

Obama and presidents Otto Perez Molina of Guatemala, Juan Orlando Hernandez of Honduras and Salvador Sanchez Ceren of El Salvador agreed to work together to attack the problem.

Speaking to reporters after the meeting, Hernandez said the migrant children with a parent in the United States had rights.

"They have rights, and we want them to be respected," he said.

Washington needed to understand that the violence in Central America stemming from drug trafficking had enormous costs, he added.

Obama acknowledged in the meeting that Washington had a responsibility to counter the drug trade.

Obama's drive to tackle the migrant crisis with $3.7bn in emergency government funds is in trouble because the deeply divided Congress leaves on a month-long recess late next week and is increasingly unlikely to approve the money.

Republicans want Democrats to agree to a change in a 2008 anti-trafficking law to speed deportations before agreeing to a pared-down version of Obama's request.

Democrats do not want to speed deportations of children with links to Hispanic-Americans, who are an important Democratic voting bloc.