If the person to whom the writ is directed refuses, after service, to obey the same, the court, upon affidavit stating such facts, must issue an attachment against such person, directed to the sheriff or coroner, commanding the sheriff or coroner forthwith to arrest such person and bring such person immediately before such court, and upon being so brought that person must be committed to the jail of the county until that person makes due return to such writ or is otherwise legally discharged. The person disobeying such writ also shall forfeit to the person imprisoned or restrained a sum not exceeding five hundred dollars to be recovered in a civil action by the person restrained. If the person disobeying the writ is an officer, that officer shall be incapable of holding or executing that office.
N.D.C.C. § 32-22-10