However, in 1281 KingMengrai of Lanna finally seized the city, and made it part of his kingdom. After Burmese expansion in the 16th century, Lamphun was under Burmese rule for two centuries. In the 18th century, with the rise of Thonburi and Bangkok against Burmese rule, local leaders from Lampang agreed to be their allies.