We study the implications of credit market frictions for the dynamics of corporate capital structure and the risk of default of corporations. To do so, we develop a dynamic capital structure model in which firms face uncertainty regarding their ability to raise funds in credit markets and have to search for investors when seeking to adjust their capital structure. We provide a general analysis of shareholders' dynamic financing and default decisions, show when Markov perfect equilibria in financing and default barrier strategies exist, and when uniqueness can be achieved. We then use the model to generate a number of novel testable implications relating credit market frictions to target leverage, the pace and size of capital structure changes, creditor turnover, and the likelihood of default. (c) 2014 Elsevier Inc. All rights reserved.