Montana Constitution Article VII § 8
Section 8. Selection. (1) Supreme court justices and district court judges shall be elected by the qualified electors as provided by law.
(2) For any vacancy in the office of supreme court justice or district court judge, the governor shall appoint a replacement from nominees selected in the manner provided by law. If the governor fails to appoint within thirty days after receipt of nominees, the chief justice or acting chief justice shall make the appointment from the same nominees within thirty days of the governor’s failure to appoint. Appointments made under this subsection shall be subject to confirmation by the senate, as provided by law. If the appointee is not confirmed, the office shall be vacant and a replacement shall be made under the procedures provided for in this section. The appointee shall serve until the election for the office as provided by law and until a successor is elected and qualified. The person elected or retained at the election shall serve until the expiration of the term for which his predecessor was elected. No appointee, whether confirmed or unconfirmed, shall serve past the term of his predecessor without standing for election.
(3) If an incumbent files for election and there is no election contest for the office, the name of the incumbent shall nevertheless be placed on the general election ballot to allow the voters of the state or district to approve or reject him. If an incumbent is rejected, the vacancy in the office for which the election was held shall be filled as provided in subsection (2).