The causes and mechanisms of evolutionary diversification are central issues in biology. There is well-established theory that predicts that adaptive diversification can arise because of ecological interactions between individuals, such as competition or predation, but there are no empirical examples in which this process has been observed at the genetic level. We documented the genetic basis of adaptive diversification resulting from competition for resources in populations of the bacterium Escherichia coli. The populations diversified into two coexisting ecotypes representing different physiological adaptations. We found that similar but independently evolved phenotypes often shared mutations in the same gene and, in four cases, shared identical mutations at the same nucleotide position. Timelines of allele frequencies extracted from the frozen “fossil record” of three evolving populations showed parallel evolutionary dynamics, suggesting that mutations causing one type of physiology changed the ecological environment and allowed invasion of mutations causing an alternate physiology. The results provide empirical evidence of adaptive diversification as a predictable evolutionary process.