It is well known that competition can destroy incentives to invest in firm-specific relationships. This paper examines how the tension between relationships and competition is resolved in the investment banking market, which for decades has been characterized by both relationships and competition. The model studies the impact on relationships of four different dimensions of competition: non-exclusive relationships, competition from arm's-length intermediaries, non-price competition, and endogenous entry. The analysis shows how market equilibrium adjusts so that relationships are sustained in the face of such competition. Banks are shown to establish relationships without either local or aggregate monopoly power. The model rationalizes two distinct empirical regularities of market structure: the invariance of market concentration to market size; and a pyramidal market structure with an oligopoly comprising similar-sized players at the top and a large number of small banks at the bottom. The analysis may also shed light on the industrial organization of other professional service industries.