In 1185, the Bulgarians and Vlachs held a revolt against the Byzantine Empire, and helped by the settled Cumans from Hungary, created the Second Bulgarian Empire (1186–1396) ruled by the Asen dynasty (1187–1280). From 1280 till 1322 periodically ruled the Terter dynasty, and from 1323 till 1396 the Shishman dynasty, all the three of Cuman origin. In 1396, the Bulgarians were conquered by the Ottoman Turks, and only in 1878 established an autonomous principality, while in 1908 declared independence.