In the sixteenth century when the Portuguese were colonies in the East, and when the Sultanate of Malacca was having domain over Indonesia and the Malay state. And when Portuguese captured Malacca in 1511 and entered into a commercial treaty with Thailand, Patani was already a flourishing independent state.
It was only after 1782 when the Rama Dynasty (the present ruling Dynasty of Thailand) established itself with its capital in Bangkok that Ramas, in 1786, 1789, 1810 and 1832 invaded Patani and made it into a vasal state paying tributes. And only in 1902 Patani was claimed by Thai kingdom as apart of it.
In 1870 Rama IV began his policy of assimilation, dividing Patani into seven divisions at first, but was later changed into four divisions.
And since 1789, there have been
repeated movements for liberation which were crushed with brutal force. In that
first war in 1789, 4000 Patani citizens were arrested and taken to Bangkok.
Their descendants are now found in central Thailand - in the minority Patani
Malays.