As mayor of Hiroshima, he worked to rebuild his city as symbol for peace. As part of these efforts, he established a traditional annual speech delivered at the main memorial ceremony on August 6, known as Peace Declaration. The decision to that effect was to turn the anniversary into a festival of peace. He managed to get the support of the US occupation forces to that policy, as they hoped this would reduce criticism of the US government among the people of Hiroshima. In early 1948, several citizens' groups in Hiroshima were formed in order to convince the Japanese government to release former military land for civilian purposes, and together with Hamai decided to work for the enactment of a special legislation regarding the status of Hiroshima. To achieve that end, Hamai made numerous trips to the Japanese Diet in Tokyo along with his secretary Chimata Fujimoto and city council chairman Tsukasa Nitoguri. Following the parliamentary election of January 1949, he got the support of the ruling Liberal Party under Shigeru Yoshida for the initiative. These efforts led to the proclamation of Hiroshima as a city of peace under Japanese law. The law to that effect was passed in the Lower House on May 10, 1949, and in the Upper House to following day. In order for the law to become effective, it required approval by municipal referendum, which was held on July 7 ended with approval of the new law. The law went into effect on August 6, 1949.