- Founded: 1450s
- Other Names: 太平山 (Taiheizan)
- Japanese: 安国禅寺 (Ankokuzenji)
It is believed to have been founded during the reign of King Shô Taikyû, or by his son, King Shô Toku, for the purpose of Shô Taikyû's memorial service. The first abbot of temple was Xīshān Zhōuyōng, a Chan Buddhist master from Zhejiang province. The temple later became a branch temple of Tenkai-ji.
The temple was originally located on the banks of the Shuri Kubagawa, but was moved to its current location in 1674 during the reign of King Shô Tei, and was used on a number of occasions as the site of the training camp for musicians & dancers preparing for Ryukyuan missions to Edo. The temple was destroyed in the 1945 Battle of Okinawa, but has since been rebuilt.
One of the temple's bells was originally cast in 1456, for the temple Tenryû-ji, founded in that year by Kaiin. The temple was later abandoned, and the bell moved to Tennô-ji, then to Ankokuzen-ji. In 1944, the bell was donated to the war effort, to be melted down and used to produce war materiel; however, it was discovered relatively undamaged in 1962 in Tottori prefecture, and was returned to Okinawa.
- "Ankokuji." Okinawa konpakuto jiten (沖縄コンパクト事典, "Okinawa Compact Dictionary"). Ryukyu Shimpo. 1 March 2003. Accessed 19 December 2009.
- Plaques on-site at Aijô-ufumichi.
- Miyagi Eishô 宮城栄昌, Ryûkyû shisha no Edo nobori 琉球使者の江戸上り, Tokyo: Daiichi Shobô (1982), 60.
- Gallery labels at Okinawa Prefectural Museum, August 2013.