Speaker of the House Paul Ryan, R-Wis., meets with reporters following a closed-door Republican strategy session on Capitol Hill in Washington, Tuesday, March 20, 2018. Ryan says he's hoping bargainers can resolve the final disputes in a government-wide spending bill in time for Congress to begin voting Thursday on the measure. (AP Photo/J. Scott Applewhite)
Speaker of the House Paul Ryan, R-Wis., meets with reporters following a closed-door Republican strategy session on Capitol Hill in Washington, Tuesday, March 20, 2018. Ryan says he's hoping bargainers can resolve the final disputes in a government-wide spending bill in time for Congress to begin voting Thursday on the measure. (AP Photo/J. Scott Applewhite) Credit: J. Scott Applewhite

Washington — Another brief government shutdown emerged as a distinct possibility on Tuesday after congressional negotiators were unable to finalize a massive federal spending bill, threatening their efforts to meet a Friday night deadline for action.

Standing in the way of the $1.3 trillion spending agreement to fund all government agencies and programs through Sept. 30 are disputes over immigration, a giant tunnel under the Hudson River and various other issues that were still being hashed out on Tuesday evening — a day after top congressional officials hoped to have a deal concluded.

House Republicans left a morning conference meeting on Tuesday expecting to vote on the bill no sooner than Thursday. That would leave the Senate scant time to act by Friday at midnight to stave off a third government shutdown this year and empower any one senator to take advantage of the chamber’s rules to extend debate beyond the deadline.

“It could happen,” Sen. John Thune, S.D., the No. 3 Senate Republican leader, said about the possibility of a short shutdown or a multiday bill that could keep lawmakers in Washington over the weekend as tens of thousands of protesters crowd the city to call for congressional action on gun control.

The thorniest issue seemed to be immigration policy, according to aides familiar with the talks, including how much funding would be available to construct the border wall favored by President Trump, as well as to hire immigration enforcement officers and support facilities to detain immigrants in the country illegally.

An effort to trade border wall money for protections for certain young immigrants appeared to have fallen apart. Trump continued to push for a last-minute deal as recently as Monday, but Democrats resisted the terms of the White House offer.

Lawmakers also continued to squabble over the Gateway project, which includes a costly tunnel to connect New Jersey and Manhattan — a $900 million federal contribution that is a top priority for Senate Minority Leader Chuck Schumer, D-N.Y., and some House Republicans but is opposed by Trump.

The omnibus legislation, which is expected to run upward of 1,000 pages, was supposed to be filed on Monday, but that did not happen. Instead, House GOP leaders told lawmakers on Tuesday morning that they hoped to complete the bill later in the day and vote on it on Thursday.

“Hopefully soon,” House Speaker Paul Ryan, R-Wis., told reporters on Tuesday morning. “There are some unresolved issues. We’re working through them while we speak, and we’re hoping to close it today.”

But by Tuesday evening, top congressional leaders weren’t guaranteeing that the bill would be done by day’s end.

With conservatives expected to oppose the legislation on fiscal grounds, Democratic votes will be needed in both chambers to pass the legislation. That has empowered Democrats to make demands on a variety of issues while resisting GOP priorities.