 Ani attained the peak of its power during the long reign of King Gagik I (989–1020).After his death his two sons quarreled over the succession.The eldest son, Hovhannes-Smbat (1020–41), gained control of Ani while his younger brother, Ashot IV (1020–40), controlled other parts of the Bagratuni kingdom.