WASHINGTON — In the early days of the Trump presidency, Republicans and Democrats on Capitol Hill have not agreed on much. But they have come together to keep the government open for the next several months.

The more than $1 trillion spending deal that congressional leaders reached on Sunday was an act of compromise, a rarity in a highly polarized Congress.

But that was the easy part. The fiscal year is already more than halfway over, and the new spending package — which must still be approved by lawmakers — covers only the next five months. A bigger fight awaits as the year goes on and President Trump tries to put his imprint on the budget for the next fiscal year, which begins Oct. 1.