The Knesset elected Yosef Shapira to be the new state comptroller in a third ballot on Monday in a 68 to 40 vote; he will replace current State Comptroller Micha Lindenstrauss on July 4.

The vote was conducted by secret ballot. The contest pitted Supreme Court Vice President Eliezer Rivlin against District Court Judge Shapira and Shlomo Calderon. Because a candidate must receive at least 61 votes in order to be appointed, the decision went into  a third round until a clear victor was chosen.

The first vote yielded a result of 58 votes for Shapira, 44 for Rivlin, and 10 for Calderon. The second round also yielded no clear winner, with 59 MKs voting for Shapira, 45 for Rivlin, and two for Calderon. In the third and final round, Shapira garnered 68 votes to Rivlin’s 40.

Shapira, 67, has been in the Jerusalem District Court for nine years and served as a judge with the rank of colonel in the military court system.

Initial media reports predicted Shapira’s appointment to the position because he already had the written support of over 70 MKs. Both Prime Minister Benjamin Netanyahu and his coalition partner Shaul Mofaz reportedly backed Shapira.