The Jaffna Kingdom (யாழ்ப்பாண அரசு, යාපනය රාජධානිය; 1215–1624 CE), also known as Kingdom of Aryachakravarti, was a historical kingdom of what today is northern Sri Lanka. It came into existence around the town of Jaffna on the Jaffna peninsula and was traditionally thought to have been established after the invasion of Kalinga Magha from Kalinga in India. Established as a powerful force in the north, northeast and west of the island, it eventually became a tribute-paying feudatory of the Pandyan Empire in modern South India in 1258, gaining independence when the last Pandyan ruler of Madurai was defeated and expelled in 1323 by Malik Kafur, the army general of the Delhi Sultanate. For a brief period in the early to mid-14th century it was an ascendant power in the island of Sri Lanka, to which all regional kingdoms accepted subordination. However, the kingdom was overpowered by the rival Kotte Kingdom around 1450 when it was invaded by Prince Sapumal under the orders of Parakramabahu VI.
It gained independence from Kingdom of Kotte control in 1467, and its subsequent rulers directed their energies towards consolidating its economic potential by maximising revenue from pearls, elephant exports and land revenue. It was less feudal than most of the other regional kingdoms on the island of Sri Lanka of the period. During this period, important local Tamil literature was produced and Hindu temples were built, including an academy for language advancement. The Sinhalese Nampota dated in its present form to the 14th or 15th century CE suggests that the whole of the Jaffna Kingdom, including parts of the modern Trincomalee District, was recognised as a Tamil region by the name Demala-pattanama (Tamil city). In this work, a number of villages that are now situated in the Jaffna, Mullaitivu and Trincomalee districts are mentioned as places in Demala-pattanama.
The arrival of the Portuguese on the island of Sri Lanka in 1505, and its strategic location in the Palk Strait connecting all interior Sinhalese kingdoms to South India, created political problems.