Which budgetary institutions result in efficient provision of public goods? We analyze a model with two parties deciding the allocation to a public good each period. Parties place different values on the public good, but these values may change over time. We model a budgetary institution as the rules governing feasible allocations to mandatory and discretionary spending programs. We model mandatory spending as an endogenous status quo since it is enacted by law and remains in effect until changed, and discretionary spending as periodic appropriations that are not allocated if no new agreement is reached. We consider budgetary institutions that either allow only discretionary programs, only mandatory programs, an endogenous choice of mandatory and discretionary programs, or state-contingent mandatory programs. We show that discretionary only institutions can lead to dynamic inefficiencies, mandatory only institutions can lead to static and dynamic inefficiencies, whereas allowing mandatory programs with appropriate flexibility results in static and dynamic efficiency.