  We study the maximal subgroups (also known as group $\mathcal{H}$-classes) of
finitely presented special inverse monoids. We show that the maximal subgroups
which can arise in such monoids are exactly the recursively presented groups,
and moreover every such maximal subgroup can also arise in the $E$-unitary
case. We also prove that the possible groups of units are exactly the finitely
generated recursively presented groups; this improves upon a result of, and
answers a question of, the first author and Ru\v{s}kuc. These results give the
first significant insight into the maximal subgroups of such monoids beyond the
group of units, and the results together demonstrate that it is possible for
the subgroup structure to have a complexity which significantly exceeds that of
the group of units. We also observe that a finitely presented special inverse
monoid (even an $E$-unitary one) may have infinitely many pairwise
non-isomorphic maximal subgroups.
