Deputy Mike Torode has been elected as the new chief minister of Guernsey.
Mike Torode received two more votes than Peter Roffey
The politician defeated Peter Roffey in the final round of voting, held as a secret ballot in the States.
Two other candidates standing for election, Jonathan Le Tocq and Bernard Flouquet, were eliminated after the second vote.
Bailiff Geoff Rowland made the announcement after the third ballot. Mr Torode defeated Mr Roffey by 24 votes to 22.
The election follows the political fall out over the tendering process for a new clinical block at the Princess Elizabeth Hospital.
Laurie Morgan, the former chief minister, resigned with the Policy Council after a highly critical report by the Wales Audit Office (WAO).
It was asked to carry out an independent investigation following concerns that the Policy Council may have used its influence to encourage building firm RG Falla to withdraw, despite its bid being £2.4m lower than the one accepted.
The election of the remaining ministers for the Policy Council will be held on 7 March, and any positions created on committees and departments will be filled on 9 March.