sentences:  He was the son of Jayapala, whose kingdom used to stretch from Laghman to Kashmir and Sirhind to Multan, with Peshawar being in the center, but had lost most of his territories to Sabuktagin and his son Mahmud.Anandapala and his confederacy was defeated by Mahmud of Ghazni when his elephant suddenly took flight and turned the tide of the battle.Prince Anandapala who ascended his father's throne in about March/April AD 1002 already proved an able warrior and general in leading many battles prior to his ascension.