Emperor Xiaowen of Northern Wei
The earliest history of the creation of Longmen Grottoes is traced to the reign of Emperor Xiaowen of Northern Wei dynasty when he shifted his capital to Luoyang from Dàtóng; Luoyang's symbolic value is borne by the fact that it served as the historic capital for 13 dynasties. The grottoes were excavated and carved with Buddhist subjects over the period from 493 AD to 1127 AD, in four distinct phases. The first phase started with the Northern Wei dynasty (493–534). The second phase saw slow development of caves as there was interruption due to strife in the region, between 524 and 626, during the reign of the Sui dynasty (581–618) and the early part of the Tang dynasty (618–907). The third phase, was during the reign of the Tang dynasty when Chinese Buddhism flourished and there was a proliferation of caves and carvings from 626 to the mid 8th century. The last phase, which was the fourth, was from the later part of the Tang dynastic rule extending to the Northern Song Dynasty rule, which saw a decline in the creation of grottoes. It came to an end due to internecine war between the Jin and Yuan dynasties.