This paper proposes a simple two-stage mechanism to establish positive contributions to public goods in the absence of powerful institutions to provide the public good and to sanction free-riders. In this mechanism players commit to the public good by paying a deposit prior to the contribution stage. If there is universal commitment, deposits are immediately refunded whenever a player contributes her specified share to the public good. If there is no universal commitment, all deposits are refunded and the standard game is played. For suitable deposits, prior commitment and full ex post contributions are supported as a subgame-perfect Nash equilibrium for the resulting game. As the mechanism obviates the need for any ex post prosecution of free-riders, it is particularly suited for situations where players do not submit to a common authority as in the case of international agreements.