We model the interaction between bank capital regulation and financial innovation. Innovation takes the form of structured finance, namely, pooling and tranching of assets and the creation of separate structures with different seniority, different risk, and different capital charges. Structured finance can improve welfare by manufacturing safer securities, saving on the capital that the structures with different seniority need to satisfy incentive constraints. The divergence between private and social interests in future profits motivates regulation. Regulation lowers profits and may induce banks to innovate to evade the regulation itself, even if this decreases welfare.