When Tel Aviv was recognized as a city, Dizengoff was elected mayor. He remained in office until shortly before his death, apart from a three-year hiatus in 1925–1928. During World War I, the Ottomans drove out a large part of the population and Dizengoff was the liaison between the exiles and the Ottoman authorities.