  Due to the exponential growth of genomic data, constructing dedicated data
structures has become the principal bottleneck in common bioinformatics
applications. In particular, the Burrows-Wheeler Transform (BWT) is the basis
of some of the most popular self-indexes for genomic data, due to its known
favourable behaviour on repetitive data.
  Some tools that exploit the intrinsic repetitiveness of biological data have
risen in popularity, due to their speed and low space consumption. We introduce
a new algorithm for computing the BWT, which takes advantage of the redundancy
of the data through a compressed version of matching statistics, the
$\textit{CMS}$ of [Lipt\'ak et al., WABI 2022]. We show that it suffices to
sort a small subset of suffixes, lowering both computation time and space. Our
result is due to a new insight which links the so-called insert-heads of
[Lipt\'ak et al., WABI 2022] to the well-known run boundaries of the BWT.
  We give two implementations of our algorithm, called
$\texttt{CMS}$-$\texttt{BWT}$, both competitive in our experimental validation
on highly repetitive real-life datasets. In most cases, they outperform other
tools w.r.t. running time, trading off a higher memory footprint, which,
however, is still considerably smaller than the total size of the input data.
