The head of US Customs and Border Protection has defended his agents' handling of two sick children who died in their custody, saying they did everything they could to get medical help for them in difficult circumstances.

The deaths have intensified the debate over US immigration policy as President Donald Trump holds onto his demand that lawmakers give him $5 billion to fund a wall along the border with Mexico.

The impasse over Mr Trump's border wall resulted in a partial government shutdown that entered its ninth day today.

CBP Commissioner Kevin McAleenan told ABC's This Week it had been a decade since a child had died in the agency's custody and that the loss of two Guatemalan children in three weeks was "just absolutely devastating for us on every level."

Felipe Gomez Alonzo, 8, died on Christmas Day.

In early December, seven-year-old Jakelin Caal died after being detained along with her father by US border agents in a remote part of New Mexico.

Yesterday, Mr Trump blamed Democrats for the deaths of the two children in a Twitter post, drawing criticism that he was politicising the tragedies.

The standoff over his demand for wall funding will be a test for Congress when it returns this week with Democrats in control of the House of Representatives.

Mr Trump sees the wall as vital to stemming illegal immigration, while Democrats and some Republicans see it as impractical and costly.

After the death of the second child, the CBP said it will conduct secondary medical checks on all children in its custody, with a focus on those under ten.

Jakelin was 150km from a Border Patrol station when she began vomiting on a bus ride to the station, Mr McAleenan said on ABC.

He said a Border Patrol agent who was a paramedic revived her there and she was taken to a children's hospital in El Paso, where she died.

In Felipe’s case, Mr McAleenan said, it was a Border Patrol agent who first noticed he was ill and sent him and his father to a hospital.

State officials in New Mexico said on Friday that Felipe had the flu before he passed away.

"Our agents did everything they could, as soon as these children manifested symptoms of illness, to save their lives," Mr McAleenan said.

He said the number of families and children crossing the border illegal has increased steadily in recent months and made up 65% of crossings in December.

Those families and children are entering a system set up for adults.

"We don't want them in border patrol stations. We want them in a better scenario for these vulnerable populations that we are seeing".

A border wall was the last measure listed by Mr McAleenan as necessary to address what he called a crisis at the southern border - after new legislation in Congress, investing in Central American nations to help improve life there, and working with Mexico on a joint plan for handling migrants.

"We need a sober-minded nonpartisan look at our immigration laws to really confront and grapple with the fact that children and families are coming into this cycle," he said.

"That's first and foremost."

Before it can hope to tackle complex immigration legislation, Congress must reach a deal on the critical spending measure.

Republican Senator Lindsey Graham proposed enticing Democrats into supporting Mr Trump's border wall by offering in return a measure providing legal status for 700,000 so-called Dreamers, children who were brought to the United States illegally.

"So to my Democratic friends, there will never be a deal without wall funding and many Republicans are going to offer something as an incentive to vote for wall funding that you have supported in the past," Senator Graham said on CNN's State of the Union.

However, fellow Republican Senator Richard Shelby warned on CBS' Face the Nation that negotiations were at an impasse and the shutdown "could last a long, long time."

Democratic US Representative Hakeem Jeffries said the country needs comprehensive immigration reform and border security.

"But we are not willing to pay $2.5 billion or $5 billion and wasting taxpayer dollars on a ransom note because Donald Trump decided that he was going to shut down the government and hold the American people hostage," Mr Jeffries said.