Top Capitol Hill negotiators are reporting progress toward a long-sought agreement on a massive $1 trillion-plus spending bill that would fund the day-to-day operations of virtually every federal agency through Oct. 1.

Aides say lawmakers closely involved in the talks have worked through many sticking points in hopes of making the measure public as early as Sunday night. The House and Senate have until Friday at midnight to pass the measure to avert a government shutdown.

The catchall spending bill would be the first major piece of bipartisan legislation to advance during President Donald Trump's short tenure in the White House. It denies Trump a win on his oft-promised wall along the U.S.-Mexico border, but gives him a down payment on his request to strengthen the military.

It also rejects White House budget director Mick Mulvaney's proposals to cut popular programs such as funding medical research and community development grants.

Most of the core decisions about agency budgets have been worked out, but unrelated policy issues -- such as a Democratic request to help the cash-strapped government of Puerto Rico with its Medicaid burden -- were among the final holdups.

The aides required anonymity because the talks are not final and the measure has yet to be released.

Democrats have denied Trump a big-picture win on obtaining an initial down payment for his oft-promised border wall with Mexico, while anti-abortion lawmakers didn't even attempt to use the must-pass measure to try to cut off federal money for Planned Parenthood.

Details are closely held, but Trump and Capitol Hill defense hawks have procured a $15 billion infusion of cash for Pentagon readiness and won funding for other border security accounts, such as detention beds for people entering the country illegally.

Democrats praised a $2 billion funding increase for the National Institutes of Health -- rejecting the steep cuts proposed by Trump -- as well as additional funding to combat opioid abuse, fund Pell Grants for summer school and additional transit funding.

A provision extending health care for 22,000 retired Appalachian coal miners and their families was on track to provide permanent health benefits, a priority of Senate Majority leader Mitch McConnell, R-Ky., and other Appalachia region lawmakers.

Democratic votes will be needed to pass the measure, so even though Republicans control both the White House and Congress, Democrats have been actively involved in the talks, which appear headed to produce a lowest-common-denominator measure that won't look too much different than the deal that could have been struck on President Barack Obama's watch last year.

Republicans had pressed for policy wins with so-called riders related to other abortion-related issues and blocking environmental regulations such as Obama's sweeping expansion of the Clean Water Act.

They also hoped to chuck new financial rules. But Democrats pushed back and were hopeful that the measure would not contain many items they deemed "poison pills."