The coexistence of direct financing and intermediation is shown in a model with asymmetrically informed borrowers and lenders. Using a game theoretic approach we first prove the existence of optimal contracts between (a) firms and intermediaries; (b) firms and direct investors; and (c) between intermediaries and depositors. With the possible exception of the contracts between firms and intermediaries, all optimal contracts are shown to be standard debt contracts. We prove the existence of a perfect equilibrium and classify all possible equilibrium payoffs. Finally we study credit rationing in our model.