Wei, known in historiography as the Northern Wei (北魏), Tuoba Wei (拓跋魏), Yuan Wei (元魏i) and Later Wei (後魏), was an imperial dynasty of China ruled by the Tuoba (Tabgach) clan of the Xianbei. The first of the Northern dynasties, it ruled northern China from 386 to 535 during the period of the Northern and Southern dynasties. Described as "part of an era of political turbulence and intense social and cultural change", the Northern Wei dynasty is particularly noted for unifying northern China in 439, bringing an end to the chaotic Sixteen Kingdoms period, and strengthening imperial control over the rural landscape via reforms in 485. This was also a period of introduced foreign ideas, such as Buddhism, which became firmly established.