WASHINGTON — House and Senate negotiators reached accord on a trillion-dollar spending plan that will finance the government through September, reversing some cuts to military veterans’ pensions that were included in a broader budget agreement last month and defeating efforts to rein in President Obama’s health care law.

The hefty bill, filed in the House on Monday night, neutralized almost all of the 134 policy provisions that House Republicans had hoped to include, with negotiators opting for cooperation over confrontation after the 16-day government shutdown in October.

Measures to eliminate the Environmental Protection Agency’s ability to regulate greenhouse gases and reverse clean water regulations did not survive the final negotiations.

Republicans also relented on their efforts to strip financing to carry out the Affordable Care Act.

“Obamacare lives another day,” said Senator Barbara A. Mikulski, Democrat of Maryland, the chairwoman of the Senate Appropriations Committee.

The compromises may be difficult to accept for conservative Republicans, many of whom campaigned in 2010 vowing never to vote on a phone-book-size bill they have not had time to read. And because many of them will balk, the bill will have to have bipartisan support to pass.

Republican and Democratic leaders said they believed they would easily get majorities in the House and Senate, but not without loud protests from both the right and the left.

Republicans do get to point to some conservative victories. The bill would cut $1 billion from the Affordable Care Act’s Prevention and Public Health Fund, which Republicans have long targeted, fearing the administration would use it to bolster the law’s online insurance exchanges.

The legislation also would impose new requirements for the Internal Revenue Service in reporting its activities to the public and Congress after the agency’s scrutiny of Tea Party groups’ applications for nonprofit status. The $11.3 billion appropriated for the I.R.S. is down $503 million from the level enacted in 2013.

No money would be given to Vice President Joseph R. Biden Jr.’s high-speed rail projects, or to Mr. Obama’s preschool development grants program. And some new regulations supported by liberals would be blocked, including a standard for energy-efficient light bulbs and livestock and poultry controls.

Conservatives also succeeded in prohibiting the Obama administration from transferring inmates to the United States from the military prison in Guantánamo Bay, Cuba.

Otherwise, the bill’s winners and losers seem to follow no patterns. The National Institutes of Health, long a congressional favorite, would get $29.9 billion, down $714 million from the level approved by Congress for 2013. Still, the N.I.H. would end up with $1 billion more than it did last year after the across-the-board spending cuts, known as sequestration, severely curtailed its research grants.

In contrast, Head Start, which also suffered last year, would see a $612 million increase, enough to restore the sequestration cuts.

The military budget would total $572.6 billion, $20 billion less than House Republicans wanted. The bill also explicitly prohibits the Postal Service from cutting Saturday mail delivery or closing rural post offices.

Despite the concern over security after the 2012 attack on the United States Mission in Benghazi, Libya, the spending bill earmarks less to embassy security, construction and maintenance than it allotted for fiscal 2013 — $2.67 billion, down by $224 million.

Specific areas of the country would benefit from provisions. They include $128 million for an expanded border crossing station at San Ysidro, Calif., between San Diego and Tijuana, Mexico. But the final bill allocates less than the$226 million for the project that had been requested by the Obama administration.

The spending bill’s costs were set in a deal last month by Representative Paul D. Ryan of Wisconsin and Senator Patty Murray of Washington, leaders of the Budget Committees.

But the final bill restores part of that accord’s most controversial spending cut — a one-percentage-point reduction in cost-of-living adjustments to the pensions of working-age military veterans. Under the bill, that cut will not apply to disabled veterans. Lawmakers in both parties have pledged to eliminate the reduction.

The final plan would raise spending on programs at Congress’s annual discretion by $25 billion over the limit originally set by the House, but it cuts spending by $25 billion from the limit approved by the Senate.

Eric Lipton contributed reporting.

Correction: January 15, 2014

An article on Tuesday about the United States government’s trillion-dollar spending plan misstated the level of funding in the bill for the National Institutes of Health relative to what the agency received after across-the-board spending cuts known as sequestration. The amount would be $1 billion more, not $1 million more.