In a civil action prosecuted in the name of the state by an officer duly authorized for that purpose, the state is liable for the costs in the same cases and to the same extent as a private party. If a private person is joined with the state as plaintiff, that person is liable in the first instance for the defendant's costs, which may not be recovered of the state until after execution is issued therefor against such private party and returned unsatisfied.
N.D.C.C. § 28-26-22