WASHINGTON — Congress was poised Thursday to approve a $1.3 trillion federal spending bill that would set aside millions for the Chesapeake Bay and other Maryland priorities that had been threatened by deep cuts.

The sweeping legislation, unveiled days before lawmakers face another government shutdown, would boost military spending and provide $1.6 billion for security along the U.S. border with Mexico — far short of the $25 billion President Donald J. Trump sought. The measure included no resolution for the so-called “Dreamers,” the young immigrants brought to the country illegally as children.

“There is no question that this legislation represents compromise,” said Sen. Chris Van Hollen, a Maryland Democrat who is a member of the Senate Appropriations Committee. “But it includes many hard-fought Maryland priorities.”

The bill was approved in the House on a 256-167 vote just hours after it was revealed, but its immediate prognosis was less clear in the Senate — where a single senator has the power to hold up a vote until the weekend. The government is set to run out of its authority to spend money at midnight today.

For Maryland, the bill mostly maintains the status quo by overriding significant reductions proposed by the White House. The National Institutes of Health in Bethesda, a major source of research grants for Johns Hopkins and the University of Maryland, would receive a $3 billion increase. Trump’s most recent proposed budget would have kept funding for the agency at the same level as last year.

Though the Trump administration had called to eliminate Chesapeake Bay funding in the current fiscal year, the bill would maintain the program at $73 million. Lawmakers also directed the Environmental Protection Agency to keep its Chesapeake Bay office in Annapolis rather than moving it to Fort Meadein Anne Arundel County.

The EPA had considered the move as a cost-saving measure, but advocates and some Democratic lawmakers said it would make it harder to coordinate bay recovery efforts.

“Once again, the Chesapeake attracts strong bipartisan support,” Chesapeake Bay Foundation President William C. Baker said.

Among Maryland’s delegation, Reps. Anthony G. Brown of Prince George’s County, John Delaney of Montgomery County, C.A. Dutch Ruppersberger of Baltimore County and John Sarbanes of Baltimore County voted for the bill. Democratic Reps. Steny H. Hoyer of Southern Maryland and Jamie Raskin of Montgomery County and Republican Rep. Andy Harris of Baltimore County voted against it. Rep. Elijah E. Cummings, a Baltimore Democrat recovering from a knee infection, did not vote.

Harris, the only Republican in the delegation, frequently votes against spending measures. He said the legislation would “balloon our deficit and will continue to fund unlawful sanctuary cities.”

The 2,232-page bill represents a stark departure from the priorities Trump outlined in his budget proposal last year. It includes $3.3 billion for Community Development Block Grants. The program is used heavily in cities like Baltimore, but has faced stiff criticism from conservatives and the Trump administration, who question its oversight and whether it has had the impact that supporters claim.

White House budget director Mick Mulvaney said Thursday that the president would sign the bill.

“It funds his priorities,” Mulvaney said. “There was no chance of everything we wanted passing.”

Lawmakers said they did not include money for the administration’s proposal to rebuild the FBI headquarters in Washington because “many questions regarding the new plan remain unanswered.”

Leaders in Maryland and Virginia competed for years to land a new headquarters before the General Services Administration abruptly canceled it a year ago. The GSA said last monthit would rebuild at the agency’s current location in Downtown Washington instead.

Lawmakers from both states have noted that the FBI had previously said that idea would not meet the agency’s security requirements. Specifically, the FBI had previously soughta suburban building that would be set back from vehicle traffic.

“Until these concerns are addressed and the appropriate authorizing committees approve a prospectus, the committees are reluctant to appropriate additional funds for this activity,” House and Senate appropriators wrote.

Hoyer, who voted against the bill, said “serious questions remain about why GSA and FBI abruptly changed direction.”

Lawmakers included funding for a pair of climate science programs tied to Goddard Space Flight Center in Greenbelt that the White House had proposed eliminating. One, called Plankton, Aerosol, Cloud, ocean Ecosystem, which is being tested at Goddard, would monitor the health of Earth's oceans, including the cycling of carbon. Another mission, DSCOVR, monitors changes in the Earth's ozone as well as the energy emitted from the sunlit face of the planet.

The bill would keep opentwo biosecurity labs in Maryland — the National Biodefense Analysis and Countermeasures Center at Fort Detrick and the Chemical Security Analysis Center at Aberdeen Proving Ground — that had been threatened with closure.

“These labs are indispensable when it comes to defending against biological pathogens and chemical weapons, from anthrax to Ebola,” said Ruppersberger, who has worked on the issue since the White House proposed closing the facilities last year.

Lawmakers also agreed to extend a provision that prohibits the Justice Department from prosecuting cases in opposition to medical marijuana laws, including Maryland’s nascent program. That provision was viewed by local advocates as especially important after the Justice Department in January rescinded an Obama-era policy of not interfering with state marijuana laws.

The bill includes measures to bolster compliance with the criminal background check system for firearm purchases. Democrats sought and won language that would free the Centers for Disease Control and Prevention to conduct research on gun violence.

john.fritze@baltsun.com

twitter.com/jfritze