1. Where one spouse is entitled to occupy a dwelling-house by virtue of a protected tenancy, a statutory tenancy or a secure tenancy, then, on granting a decree of divorce, a decree or nullity of marriage or a decree of judicial separation, or at any time thereafter (whether, in the case of a decree of divorce or nullity of marriage, before or after the decree is made absolute), the court by which the decree is granted may make an order under Part II.