The fifth Dalai Lama, who consolidated Gelug religious authority into direct political rule over Tibet in the mid seventeenth century, began building the Potala Palace on Marpo Ri, the Red Hill, above the city in 1645, raising it over the remains of an earlier fortress. The finished palace combined a White Palace, holding the machinery of government, with a Red Palace of chapels and the funerary stupas of successive Dalai Lamas, and it functioned as both residence and seat of government for the next three centuries.
Tibetan Buddhism developed its own institution for continuing that leadership across generations: on a Dalai Lama's death, senior lamas search for a child recognized, through signs, divination and testing against the deceased lama's possessions, as his reincarnation, a process traditionally consulting the sacred lake Lhamo Latso. The fourteenth Dalai Lama, recognized as a child in the 1930s, ruled from the Potala until March 1959, when a popular uprising against Chinese administration was suppressed and he fled to exile in India, where the Tibetan government he leads has continued to operate since. Lhasa remains under Chinese administration as capital of the Tibet Autonomous Region, and the Potala, no longer a seat of government, now functions as a museum and pilgrimage site.