Pattani has its origins in the ancient Hindu Malay kingdom of Langkasuka. Later it became the center of an epynomous kingdom, the Kingdom of Patani. This kingdom was for long a protectorate of Siam, but since 1902 the entire region has been directly ruled from Bangkok.
Pattani was one of the first regions in southeast Asia to adopt Islam, starting in the 14th century. It later became a center for Islamic scholarship, and a center of worship for a much wider region.