In the 14th century , a south Indian dynasty established a Tamil kingdom in northern Sri Lanka .