During the reign of King Tresang Detsan from 755 to 797, Buddhists were persecuted because the king's minister, Marshang Zongbagyi (a devotee of Bon), was hostile to Buddhism. During this time the image of Akshobya Buddha in the Jokhang temple was hidden underground, reportedly 200 people failed to locate it. The images in the Jokhang and Ramoche temples were moved to Jizong in Ngari, and the monks were persecuted and driven from Jokhang. During the anti-Buddhist activity of the late ninth and early tenth centuries, the Jokhang and Ramoche temples were said to be used as stables. In 1049 Atisha, a renowned teacher of Buddhism from Bengal who taught in Jokhang and died in 1054, found the "Royal Testament of the Pillar" "(Bka' chems ka khol ma)" in a pillar at Jokhang; the document was said to be the testament of Songtsen Gampo.