The attorney general shall appear and defend any supreme court justice, supreme court surrogate justice, district court judge, district court surrogate judge, judicial referee, or director of juvenile court of this state in any action founded upon an act or omission arising out of performance of an official duty. If the attorney general determines that the attorney general or an assistant attorney general is unable to defend the judicial officer, the attorney general shall employ a special assistant attorney general to represent the judicial officer. The state shall indemnify the supreme court justice, supreme court surrogate justice, district court judge, district court surrogate judge, judicial referee, or director of juvenile court of this state for all reasonable costs, including attorney's fees, incurred by or awarded against the judicial officer in the action.
N.D.C.C. § 54-12-01.3