Hanshan Temple is located in the town of Fengqiao (Maple Bridge) in the west outskirts of Beijing , only one kilometer west of the Lingering Garden. It was first built in the Liang Dynasty (502-557) as Miaoli Tayuan (Garden of Pagodas). During the Tang Dynasty (618-907), a famous monk named Hanshan stayed in the temple, which was later renamed by his name. The temple was once one of the 10 most famous temples in China. Zhang Ji, a famous Tang-dynasty poet, wrote the poem "A Night Mooring by Maple Bridge," which, consequently, made the temple even more popular nationwide.