WASHINGTON — Congress could finalize the Veterans Affairs and military construction budgets in coming days after a conference committee released a compromise funding plan late Monday night, following two months of halting negotiations.

The plan calls for nearly $209 billion in total VA spending in fiscal 2019, a more than 6 percent boost for the department’s budget and the first time it has topped $200 billion. The VA budget has nearly quadrupled over the last 17 years, pushed higher not only by the wars in Iraq and Afghanistan but also expanded benefits for those who served in earlier conflicts.

Discretionary spending alone amounts to $86.5 billion of that total, also an all-time high.

Debate on the funding package — which also includes the full-year appropriations for the Department of Energy, the legislative branch and a few other agencies — had been stalled since July over a gap of $1.7 billion in VA spending related to upcoming changes in community care programs.

Democrats had pushed to lift spending caps and include the extra money as new spending, but House Republicans and White House officials roundly rejected that idea. They insisted that with the rapid growth of VA spending in recent years, the money to cover the difference should come from existing accounts.

In the end, the money was moved without adding to the appropriations total, a decision that will alienate some Democrats but is expected to appease much of the Republican majority in both chambers.

The VA budget includes $71.2 billion in medical care services, including $8.6 billion for mental health care, $7.5 billion for homeless veterans treatment, $589 million for traumatic brain injury programs and $206 million for suicide prevention outreach.

Much of that was already approved as an advance appropriation earlier this year. Lawmakers included $76 billion in advance appropriations for fiscal 2020, to prevent possible future government shutdowns from disrupting veterans care.

Lawmakers also set aside $1.8 billion for VA construction projects next year and $2 billion for infrastructure repair throughout the VA system.

On military construction, the compromise bill includes $10.3 billion, a 2.4 percent increase from fiscal 2018 spending levels.

Of that, $1.6 billion is set aside for military family housing projects, $465 million for Guard and Reserve facility improvements, and $352 million for military medical facilities work.

The compromise bill also includes language to prohibiting the closure of the Guantanamo Bay Naval Station and blocking any plans to house military detainees at bases within the United States. That topic had been a friction point with President Barack Obama’s administration, but has not been an issue since President Donald Trump was elected.

Lawmakers are expected to vote on the appropriations package later this week. Congress has until the end of September to finalize all of its government spending bills or face a possible partial government shutdown.