Who gained independence in the 1400s