Congressional leaders have agreed on a $1.3 trillion spending bill to fund the government through September 30. The House and Senate had until midnight Friday to pass the spending bill to avoid another government shutdown. The 2,232-page spending bill was unveiled two days before the deadline.

The spending bill is long overdue, coming almost halfway through the 2018 fiscal year. Since the fiscal year began on Oct. 1, Congress has passed five stopgap spending measures to keep the government open. If this spending bill had failed to pass, it would have resulted in the third government shutdown of the year.

Even though the bill was touted by the leaders of the Republican party, conservatives railed at the rushed schedule and lack of transparency surrounding the bill. Leaders of the House Freedom Caucus specifically complained about the huge price tag of the omnibus bill and at the closed-door process of how it was created. According to the Committee for a Responsible Federal Budget, the deficit is now expected to exceed $1 trillion in the 2019 fiscal year when including the effects of the Republicans’ recent tax overhaul.

The spending bill contains the biggest increase in military funding in years. It would boost defense spending by $80 billion in fiscal 2018, and give troops a 2.4 percent pay raise. The legislation also includes $380 million for grants to states to improve their election infrastructure and bolster election security.

The measure also includes $1.6 billion for more than 90 miles of physical barriers along the border with Mexico, as well as related technology, to improve border security. However, Democrats demanded the bill contain restrictions that the money can’t underwrite new construction of the border wall Trump promised during the campaign. The funding is far short of the total President Trump needs to build his promised border wall and the restrictions led the president to briefly reconsider his support of the bill.

The spending bill does not include $900 million in funding for a series of rail infrastructure projects in the New York City area, including a planned rail tunnel between New York and New Jersey that had been included last year in House legislation. The bill does include hundreds of millions of dollars that could go toward those programs without having to be allocated by the Trump administration’s Transportation Department.