Langkasuka was an ancient Hindu Malay kingdom founded in the 2nd century on the Malay Peninsula, one of the earliest kingdoms there along with Old Kedah. It was located between Senggora and Manitoba on the east coast and had a capital surrounded by walls and gates. Langkasuka started as a kingdom in Kedah before moving to Patani, though how this transition occurred is unclear. The kingdom engaged in diplomatic relations with China and other Southeast Asian states. It existed until the 15th century when it was replaced by the kingdom of Patani.