By Richard Cowan
WASHINGTON (Reuters) - The U.S. Congress on Thursday aimed to end a dispute over border security with legislation that would ignore President Donald Trump's request for $5.7 billion to help build a wall on the U.S.-Mexico border but avoid a partial government shutdown.
Late on Wednesday, negotiators put the finishing touches on legislation to fund the Department of Homeland Security (DHS) through Sept. 30, the end of the fiscal year, along with a range of other federal agencies.
Racing against a Friday midnight deadline, when operating funds expire for the agencies that employ about 800,000 workers at the DHS, the departments of Agriculture, Commerce, Justice and others, the Senate and House of Representatives aimed to pass the legislation later on Thursday.
That would give Trump time to review the measure and sign it into law before temporary funding for about one-quarter of the government expires.
Failure to do so would shutter many government programs, from national parks maintenance and air traffic controller training programs to the collection and publication of important data for financial markets, for the second time this year.
"This agreement denies funding for President Trump’s border wall and includes several key measures to make our immigration system more humane," House Appropriations Committee Chairwoman Nita Lowey, a Democrat, said in a statement.
According to congressional aides, the final version of legislation would give the Trump administration $1.37 billion in new money to help build 55 miles (88.5 km) of new physical barriers on the southwest border, far less than what Trump had been demanding.
It is the same level of funding Congress appropriated for border security measures last year, including barriers but not concrete walls.
Since he ran for office in 2016, Trump has been demanding billions of dollars to build a wall on the southwest border, saying "crisis" conditions required a quick response to stop the flow of illegal drugs and undocumented immigrants, largely from Central America.
He originally said Mexico would pay for a 2,000-mile (3,200-km) concrete wall - an idea that Mexico dismissed.
Trump has not yet said whether he would sign the legislation into law if the Democratic-controlled House of Representatives and Republican-led Senate approve it, even as many of his fellow Republicans in Congress were urging him to do so.
Instead, he said on Wednesday he would hold off on a decision until he examines the final version of legislation.
But Trump, widely blamed for a five-week shutdown that ended in January, said he did not want to see federal agencies close again because of fighting over funds for the wall.
Republican Senator Lindsey Graham, who is in regular contact with the White House, said Trump was "inclined to take the deal and move on."
But Graham also told reporters that Trump would then look elsewhere to find more money to build a border wall and was "very inclined" to declare a national emergency to secure the funds for the project.
Such a move likely would spark a court battle, as it is Congress and not the president that mainly decides how federal funds get spent. Several leading Republicans have cautioned Trump against taking the unilateral action.
Under the bill, the government could hire 75 new immigrant judge teams to help reduce a huge backlog in cases and hundreds of additional border patrol agents.
Hoping to reduce violence and economic distress in Central America that fuels immigrant asylum cases in the United States, the bill also provides $527 million to continue humanitarian assistance to those countries.
The House Appropriations Committee said the bill would set a path for reducing immigrant detention beds to about 40,520 by the end of the fiscal year, down from a current count of approximately 49,060.
Democrats sought reductions, arguing that would force federal agents to focus on apprehending violent criminals and repeat offenders and discourage arrests of undocumented immigrants for minor traffic violations, for example.
The Senate Appropriations Committee, which is run by Republicans, said there were provisions in the bill that could result in an increase in detention beds from last year.
Lowey said the bill would improve medical care and housing of immigrant families in detention and expand a programme providing alternatives to detention.
The wide-ranging bill also contains some important domestic initiatives, including a $1.2 billion increase in infrastructure investments for roads, bridges and other ground transport, as well as more for port improvements.
With the 2020 decennial census nearing, the bill provides a $1 billion increase for the nationwide count. Also, federal workers, battered by the record 35-day partial government shutdown that began on Dec. 22 as Trump held out for wall funding, would get a 1.9 percent pay increase if the bill becomes law.
(Reporting by Richard Cowan; Editing by Robert Birsel)