The effect of a judgment decreeing a divorce is to restore the parties to the state of unmarried persons, but neither party to a divorce may marry except in accordance with the decree of the court granting the divorce. It is the duty of the court granting a divorce to specify in the order for judgment whether either or both of the parties shall be permitted to marry, and if so, when. The court shall have jurisdiction to modify the decree of divorce at any time so as to permit one or both of the parties to marry, if the court deems it right.
N.D.C.C. § 14-05-02