However, several days after the seizure of Shusha, Agha Mohammad Khan was killed in mysterious circumstances by his bodyguards in the town. Ibrahim Khalil khan returned to Shusha and ordered that the shah's body be honourably buried until further instructions from the nephew and heir of Agha Mohammad Shah, Baba Khan, who soon assumed the title of Fath-Alī Shah. Ibrahim khan, in order to maintain peaceful relations with Tehran and retain his position as the khan of Karabakh, gave his daughter Agha Begom, known as Aghabaji, as one of the wives of the new shah.