We develop a parsimonious model to study the effect of regulations aimed at reducing counterparty risk on the structure of over-the-counter securities markets. We find that such regulations promote entry of dealers, thus fostering competition and lowering spreads. Greater competition, however, has an indirect negative effect on market-making profitability. General equilibrium effects imply that more competition can distort incentives of all dealers to invest in efficient technologies ex ante, and so can cause a social welfare loss. Our results are consistent with empirical findings on the effects of post-crisis regulations and with the opposition of some market participants to those regulations.