An action may be brought in the name of the people of the state against any person who usurps, intrudes into, holds or exercises any office or franchise, real or pretended, within this state, without authority of law. Such action shall be brought by the prosecuting attorney of the proper county, when the office or franchise relates to a county, precinct or city, and when such office or franchise relates to the state, by the attorney general; and it shall be the duty of the proper officer, upon proper showing, to bring such action whenever he has reason to believe that any such office or franchise has been usurped, intruded into, held or exercised without authority of law. Any person rightfully entitled to an office or franchise may bring an action in his own name against the person who has usurped, intruded into, or who holds or exercises the same.
Idaho Code § 6-602