42 43 ^Joint first authors 44 *joint senior/corresponding authors emails 45 Michael Hiller: hiller@mpi-cbg.de 46 Sonja Vernes: sonja.vernes@mpi.nl 47 Eugene Myers: gene@mpi-cbg.de 48 Emma C. Teeling: emma.teeling@ucd.ie 49 2 Abstract: Bats account for ~20% of all extant mammal species and are considered exceptional 50given their extraordinary adaptations, including biosonar, true flight, extreme longevity, and 51 unparalleled immune systems. To understand these adaptations, we generated reference-quality 52 genomes of six species representing the key divergent lineages. We assembled these genomes 53 with a novel pipeline incorporating state-of-the-art long-read and long-range sequencing and 54 assembly techniques. The genomes were annotated using a maximal evidence approach, de 55 novo predictions, protein/mRNA alignments, Iso-seq long read and RNA-seq short read 56 transcripts, and gene projections from our new TOGA pipeline, retrieving virtually all (>99%) 57 mammalian BUSCO genes. Phylogenetic analyses of 12,931 protein coding-genes and 10,857 58 conserved non-coding elements identified across 48 mammalian genomes helped to resolve 59 bats' closest extant relatives within Laurasiatheria, supporting a basal position for bats within 60 Scrotifera. Genome-wide screens along the bat ancestral branch revealed (a) selection on 61 hearing-involved genes (e.g LRP2, SERPINB6, TJP2), which suggest that laryngeal 62 echolocation is a shared ancestral trait of bats; (b) selection (e.g INAVA, CXCL13, NPSR1) and 63 loss of immunity related proteins (e.g. LRRC70, IL36G), including pro-inflammatory NF-kB 64 signalling; and (c) expansion of the APOBEC family, associated with restricting viral infection, 65 transposon activity and interferon signalling. We also identified unique integrated viruses, 66 indicating that bats have a history of tolerating viral pathogens, lethal to other mammal species. 67Non-coding RNA analyses identified variant and novel microRNAs, revealing regulatory 68 relationships that may contribute to phenotypic diversity in bats. Together, our reference-69 quality genomes, high-quality annotations, genome-wide screens and in-vitro tests revealed 70 previously unknown genomic adaptations in bats that may explain their extraordinary traits. 71 72