Cotrimoxazole, the combined formulation of sulfamethoxazole and trimethoprim, is one of the treatments of choice for several infectious diseases, particularly urinary tract infections. Both components of cotrimoxazole are synthetic antimicrobial drugs, and their combination was introduced into medical therapeutics about half a century ago. In Gram-negative bacteria, resistance to cotrimoxazole is widespread, being based on the acquisition of genes from the auxiliary genome that confer resistance to each of its antibacterial components. Starting from previous knowledge on the genotype of resistance to sulfamethoxazole in a collection of cotrimoxazole resistant uropathogenic Escherichia coli strains, this work focused on the identification of the genetic bases of the trimethoprim resistance of these same strains. Molecular techniques employed included PCR and Sanger sequencing of specific amplicons, conjugation experiments and NGS sequencing of the transferred plasmids. Mobile genetic elements conferring the trimethoprim resistance phenotype were identified and included integrons, transposons and single gene cassettes. Therefore, strains exhibited several ways to jointly resist both antibiotics, implying different levels of genetic linkage between genes conferring resistance to sulfamethoxazole (sul) and trimethoprim (dfrA). Two structures were particularly interesting because they represented a highly cohesive arrangements ensuring cotrimoxazole resistance. They both carried a single gene cassette, dfrA14 or dfrA1, integrated in two different points of a conserved cluster sul2-strA-strB, carried on transferable plasmids. The results suggest that the pressure exerted by cotrimoxazole on bacteria of our environment is still promoting the evolution toward increasingly compact gene arrangements, carried by mobile genetic elements that move them in the genome and also transfer them horizontally among bacteria.