The Hanging Temple, also Hanging Monastery or Xuankong Temple is a temple built into a cliff (75 m or 246 ft above the ground) near Mount Heng in Hunyuan County, Datong City, Shanxi province, China.
According to legend, construction of the temple was started at the end of the Northern Wei dynasty by only one man, a monk named Liao Ran. Over the next 1,400 years, many repairs and extensions have led to its present-day scale.
The structure is kept in place with oak crossbeams fitted into holes chiseled into the cliffs. The main supportive structure is hidden inside the bedrock. The monastery is located in the small canyon basin, and the body of the building hangs from the middle of the cliff under the prominent summit, protecting the temple from rain erosion and sunlight. Coupled with the repair of the dynasties, the color tattoo in the temple is relatively well preserved.