Chromosomal inversions may play a central role in speciation given their ability to locally reduce recombination and therefore genetic exchange between diverging populations. We analyzed long- and short-read whole-genome data from sympatric and allopatric populations of 2 Drosophila virilis group species, Drosophila montana and Drosophila flavomontana, to understand if inversions have contributed to their divergence. We identified 3 large alternatively fixed inversions on the X chromosome and one on each of the autosomes 4 and 5. A comparison of demographic models estimated for inverted and noninverted (colinear) chromosomal regions suggests that these inversions arose before the time of the species split. We detected a low rate of interspecific gene flow (introgression) from D. montana to D. flavomontana, which was further reduced inside inversions and was lower in allopatric than in sympatric populations. Together, these results suggest that the inversions were already present in the common ancestral population and that gene exchange between the sister taxa was reduced within inversions both before and after the onset of species divergence. Such ancestrally polymorphic inversions may foster speciation by allowing the accumulation of genetic divergence in loci involved in adaptation and reproductive isolation inside inversions early in the speciation process, while gene exchange at colinear regions continues until the evolving reproductive barriers complete speciation. The overlapping X inversions are particularly good candidates for driving the speciation process of D. montana and D. flavomontana, since they harbor strong genetic incompatibilities that were detected in a recent study of experimental introgression.