The evolution of bacterial pathogens towards antibiotic resistance is not just a relevant problem for human health, but a fascinating example of evolution that can be studied in real time as well. Although most antibiotics are natural compounds produced by environmental microbiota, exposure of bacterial populations to high concentrations of these compounds as the consequence of their introduction for human therapy (and later on for farming) a few decades ago is a very recent situation in evolutionary terms. Resistance genes are originated in environmental bacteria, where they have evolved for millions of years to play different functions that include detoxification, signal trafficking or metabolic functions among others. However, as the consequence of the strong selective pressure exerted by antimicrobials at clinical settings, farms and antibiotic-contaminated natural ecosystems, the selective forces driving the evolution of these potential resistance determinants have changed in the last few decades. Natural ecosystems contain a large number of potential resistance genes; nevertheless, just a few of them are currently present in gene-transfer units and disseminated among pathogens. Along the review, the processes implied in this situation and the consequences for the future evolution of resistance and the environmental microbiota are discussed.