Gamson's Law—the proposition that coalition governments will distribute portfolios in proportion to each member party's contribution of seats to the coalition—has been one of the most prominent landmarks in coalitional studies since the 1970s. However, standard bargaining models of government formation argue that Gamson's Law should not hold, once one controls for relevant indicators of bargaining power. In this article, we extend these bargaining models by allowing parties to form pre-election pacts. We argue that campaign investments by pact signatories depend on how they anticipate portfolios will be distributed and, thus, signatories have an incentive to precommit to portfolio allocation rules. We show that pacts will sometimes agree to allocate portfolios partly or wholly in proportion to members' contributions of seats to the coalition; this increases each signatory's investment in the campaign, thereby conferring external benefits (in the form of a larger probability of an alliance majority) on other coalition members. Empirical tests support the model's predictions.