WASHINGTON (Reuters) - U.S. lawmakers neared agreement on Tuesday on a massive government spending bill that Congress hopes to pass by Friday, as congressional leaders worked to narrow their differences on thorny issues such as President Donald Trump’s border wall.

FILE PHOTO: Speaker of the House Paul Ryan (R-WI) speaks to the media after a House Republican conference on Capitol Hill in Washington, U.S., March 6, 2018. REUTERS/Joshua Roberts

Senate Majority Leader Mitch McConnell, a Republican, said he and his counterparts in the House of Representatives and Senate were “moving to completing” work on the $1.3 trillion spending bill that would significantly boost spending for the U.S. military and an array of non-military programs.

A late attempt to help young “Dreamers,” who were brought illegally into the United States by their parents, failed, however, as a White House proposal was “off the table as soon as they offered it because it was so biased,” said Senate Democratic leader Chuck Schumer.

The Republican-controlled Congress must pass the spending bill before midnight on Friday to prevent federal agencies from shutting down when their funding runs out. But divisive issues lingered, including whether to include more money for the wall Trump wants to build on the U.S.-Mexico border and a rail tunnel connecting New York and New Jersey.

Republicans wanted $1.6 billion to begin construction on the border wall that Trump campaigned on in 2016. Many Democrats have questioned the wisdom of the edifice and instead want to use a mix of high-tech devices and fencing to discourage illegal entries into the United States.

But in recent days, congressional leaders and the White House engaged in negotiations that could have given Trump the full $25 billion to build the wall. In return, Democrats could have won permanent protections for the Dreamers.

According to a source familiar with the negotiations, the talks broke down on Sunday after the White House insisted on the $25 billion but would only give the Dreamers 2-1/2 years

of protections from deportation.

Department of Homeland Security Secretary Kirstjen Nielsen met with Democratic senators, while several Republicans planned to attend a meeting at the White House, to discuss issues around immigration.

Democratic Senator Dick Durbin left the meeting with Nielsen telling reporters that DHS gave assurances that the immigrant youths would not be targeted for deportation while their situation is in flux. But he said DHS officials said there could be gaps in their work permits that were provided under an Obama-era protection program that Trump ended.

“You will have doctors, teachers, maybe members of the military in a very difficult position,” Durbin said.

‘VERY DIFFICULT PILL’

Lawmakers said congressional leaders were also arguing over whether to include federal payments for constructing a New York-New Jersey railroad tunnel, a project known as the Gateway Program. Trump has threatened to veto the bill if it does.

House Speaker Paul Ryan said lawmakers were also discussing including a proposal to improve federal background checks for gun purchases. A deadly Feb. 14 mass shooting at a high school in Parkland, Florida, has given impetus to the bill.

House Republicans emerging from a closed meeting on Tuesday morning, said there was little information provided by leadership about the state of play.

“Most of the discussion ... is trying to convince us that defense is so critical that we have to swallow everything else to give our soldiers and airmen and Marines and sailors the pay raise they need and the equipment and training they need,” said Republican Representative Kevin Cramer.

“There’s no question it’s a very high priority, but it’s becoming a very difficult pill,” Cramer said.

If negotiations wrap up later on Tuesday, the House is expected to vote by Thursday, leaving the Senate a day to pass the measure.