The origin of life entails a continuum from simple prebiotic chemistry to cells with genes and molecular machines. Using life as a guide to this continuum, we consider how selection could promote increased complexity before the emergence of genes. Structured, far-from-equilibrium environments such as hydrothermal systems drive the reaction between CO2 and H2 to form organics that self-organize into protocells. CO2 fixation within protocells generates a reaction network with a topology that prefigures the universal core of metabolism. Positive feedback loops amplify flux through this network, giving a metabolic heredity that promotes growth. Patterns in the genetic code show that genes and proteins arose through direct biophysical interactions between amino acids and nucleotides in this protometabolic network. Random genetic sequences template nonrandom peptides, producing selectable function in growing protocells. This context-dependent emergence of information gives rise seamlessly to an autotrophic last universal common ancestor.