Anuradhapura was the royal capital of Sri Lanka for over 1,300 years (4th century BCE to 11th century CE) before it was abandoned due to invasions.