The Jokhang was founded during the reign of King Songtsen Gampo. According to tradition, the temple was built for the king's two brides: Princess Wencheng of the Chinese Tang dynasty and Princess Bhrikuti of Nepal. Both are said to have brought important Buddhist statues and images from China and Nepal to Tibet, which were housed here, as part of their dowries. The oldest part of the temple was built in 652. Over the next 900 years, the temple was enlarged several times with the last renovation done in 1610 by the Fifth Dalai Lama. Following the death of Gampo, the image in Ramcho Lake temple was moved to the Jokhang temple for security reasons. When King Tresang Detsen ruled from 755 to 797, the Buddha image of the Jokhang temple was hidden, as the king's minister was hostile to the spread of Buddhism in Tibet. During the late ninth and early tenth centuries, the Jokhang and Ramoche temples were said to have been used as stables. In 1049 Atisha, a renowned teacher of Buddhism from Bengal taught in Jokhang.