Which budgetary institutions result in efficient provision of public goods? We analyze a model with two parties bargaining over the allocation to a public good each period. Parties place different values on the public good, and these values may change over time. We model a budgetary institution as the rules governing feasible allocations to mandatory and discretionary spending programs. Mandatory spending is enacted by law and remains in effect until changed, and thus induces an endogenous status quo, whereas discretionary spending is periodic appropriations that are not allocated if no new agreement is reached. We show that discretionary only institutions lead to dynamic inefficiencies and mandatory only institutions can lead to both dynamic and static inefficiencies. By introducing flexibility into budgetary institutions, either through a combination of mandatory and discretionary spending, or through a state-contingent mandatory program, we obtain static and dynamic efficiency.