Politicians agreed that Bill Thomson, an assistant chief executive at the Scottish Parliament, should become the new Commissioner for Ethical Standards in Public Life in Scotland.
The commissioner is responsible for investigating complaints about the conduct of MSPs, local councillors and members of public bodies in Scotland, as well as regulating how appointments are made to the boards of public bodies.
Mr Thomson will take on the role at the start of April next year and will have a salary of £73,000 a year.
The commissioner is appointed by the Scottish Parliamentary Corporate Body (SPCB) with the agreement of MSPs.
Liberal Democrat MSP Liam McArthur, speaking on behalf of the SPCB, said: "The commissioner's role is an important one in securing high ethical standards in public life.
"The skills Bill has deployed in the Parliament and his previous local government experience more than equip him for his new role. Bill will bring to the post enthusiasm, professionalism, fairness and integrity."
Mr Thomson has held senior posts in the Scottish public sector for the past 25 years and has worked at the Scottish Parliament since 1999, including spending some time as adviser to the Standards Committee in the early years of the Parliament. Before that he worked at a private legal practice and at the Scottish Law Commission.
He will succeed Stuart Allan, whose time as commissioner ends on March 31.