Ayari was appointed president of the Central Bank of Tunisia on 24 July 2012, replacing Mustapha Kamel Nabli and being approved by the Constituent Assembly of Tunisia by a vote of 97 to 89, with 4 abstentions.[14] His approval was highly criticized due to his relationship with former ruler Zine El Abidine Ben Ali, who was overthrown during the Tunisian Revolution in 2011.[15] As President of the Bank, he sought to improve the Tunisian economic situation,[16] while bringing reforms to banking and financial systems within the country.[17] Thanks to his efforts, he won the Tatweej Award for Excellence and Quality in the Arab world in 2014.[18] In 2017, he earned a grade of B from the Central Banker Report Cards, awarded by the American magazine Global Finance.[19] On 14 February 2018, he assured the Assembly of the Representatives of the People in a hearing that Tunisia's placement on the blacklist of the European Parliament was purely political.[20] That same day, he submitted his resignation as President of the Central Bank of Tunisia to Prime Minister Youssef Chahed.[21][22] His successor, Marouane Abassi [fr], was appointed on 19 February 2018.[23][24]