Historically Pattani Province was the centre of the semi-independent Malay Sultanate of Patani, but paying tribute to the Thai kingdoms of Sukhothai and Ayutthaya. After Ayutthaya fell in to the Burmese in 1767, the Sultanate of Patani gained full independence but under King Rama I (reigned 1782-1809) again came under Siam's control. In 1909, it was annexed by Siam as part of Anglo-Siamese Treaty of 1909 negotiated with the British Empire. Along with Narathiwat, Yala was originally part of Pattani Province but they were split off and became provinces of their own. There is a separatist movement in Yala, which after being dormant for many years erupted again in 2004.