Cooperation and the allocation of common resources are core features of social behavior. Games idealizing both interactions have been studied separately. But here, rather than examining the dynamics of the individual games, the interactions are combined so that players first choose whether to cooperate, and then, if they jointly cooperate, they bargain over the fruits of their cooperation. It is shown that the dynamics of the combined game cannot simply be reduced to the dynamics of the individual games and that both cooperation and fair division are more likely in the combined game than in the constituent games taken separately.