  We initiate the study of expansions of monoids in the class of two-sided
restriction monoids and show that generalizations of the Birget-Rhodes prefix
group expansion, despite the absence of involution, have rich structure close
to that of respective relatively free inverse monoids.
  For a monoid $M$, we define ${\mathcal{FR}}_R(M)$ to be the freest two-sided
restriction monoid generated by a bijective copy, $M'$, of the underlying set
of $M$, such that the inclusion map $\iota\colon M\to {\mathcal{FR}}_R(M)$ is
determined by a set of relations, $R$, so that $\iota$ is a premorphism which
is weaker than a homomorphism. Our main result states that
${\mathcal{FR}}_R(M)$ can be constructed, by means of a partial action product
construction, from $M$ and the idempotent semilattice of ${\mathcal{FI}}_R(M)$,
the free $M'$-generated inverse monoid subject to relations $R$. In particular,
the semilattice of projections of ${\mathcal{FR}}_R(M)$ is isomorphic to the
idempotent semilattice of ${\mathcal{FI}}_R(M)$. The result by Fountain, Gomes
and Gould on the structure of the free two-sided restriction monoid is
recovered as a special case of our result.
  We show that important properties of ${\mathcal{FR}}_R(M)$ are well agreed
with suitable properties of $M$, such as being cancellative or embeddable into
a group. We observe that if $M$ is an inverse monoid, then
${\mathcal{FI}}_s(M)$, the free inverse monoid with respect to strong
premorphisms, is isomorphic to the Lawson-Margolis-Steinberg generalized prefix
expansion $M^{pr}$. This gives a presentation of $M^{pr}$ and leads to a model
for ${\mathcal{FR}}_s(M)$ in terms of the known model for $M^{pr}$.
