When an action is commenced in a court against a member of the organized militia for an act done in an official capacity in the discharge of the member's duty or for an alleged omission to do an act that it was the member's duty to perform, the defendant must be defended by the attorney general at the expense of this state, but private counsel may be employed by the defendant.
§ 10-1-601, MCA