We develop and test a theory explaining the equilibrium matching of issuers and underwriters. We assume that issuers and underwriters associate by mutual choice, and that underwriter ability and issuer quality are complementary. Our model implies that matching is positive assortative, and that matches are based on firms' and underwriters' relative characteristics at the time of issuance. The model predicts that the market share of top underwriters and their average issue quality varies inversely with issuance volume. Various cross-sectional patterns in underwriting spreads are consistent with equilibrium matching. We find strong empirical confirmation of our theory.