We analyze the relationship between legal institutions, innovation, and growth. We compare a rigid legal system (the law is set before the technological innovation) and a flexible one (the law is set after observing the new technology). The flexible system dominates in terms of welfare, amount of innovation, and output growth at intermediate stages of technological development—periods when legal change is needed. The rigid system is preferable at early stages of technological development, when commitment problems are severe. For mature technologies, the two legal systems are equivalent. We find that rigid legal systems may induce excessive R&D investment.