996–1002) spent much of his later reign in the kingdom