Biruni's earlier contemporaries, such as
Jayhani, the vizier of the
Samanid Empire, had described parts of India in his book
Book of Routes and Kingdoms; however Biruni considered this and other books by Arab writers marred by the authors' generally superficial knowledge about India and judgemental views on aspects of India they found or suspected to be incompatible with Islam. Biruni and his teacher
Abu Nasr Mansur had studied earlier Indian texts on mathematics, such as the
Sindhind, benefiting from the historical links between his childhood
Khwarazm and India. His book
Chronology of Ancient Nations included a discussion of Indian concepts of time. After his arrival in
Ghazni, he began collecting Indian books and manuscripts. In 1018, Biruni was living in Ghazni under the rule of
Mahmud of Ghazni. Mahmud's father,
Sabuktigin, had begun conquests in India after being given Ghazni and its surrounding areas by the Samanid Empire. However, because the outskirts of Ghazni were still controlled by local Hindu princes, Sabuktigin suspended his Indian campaigns and consolidated his power and armies around Ghazni. His son Mahmud then continued his father's campaigns after assuming the throne, beginning with attacks on major population centres in Punjab and then moving to the hilltop castles of
Rajasthan. Biruni was brought to the Indus Valley in 1022 as Mahmud's personal astrologer, despite his repeated ridiculing of astrologers and their fruitless efforts to predict the future, but he soon took on the role as an expert on India. He was eventually able to travel independently in Sindh, including the city of
Multan, where he met several major
Isma'ili scholars, and parts of Punjab, including
Lahore, where he studied Sanskrit. Biruni later became proficient enough in Sanskrit to translate two books from Sanskrit into Arabic, and a book from Arabic into Sanskrit. By the time he returned to Ghazni in 1024, he had amassed a comprehensive library on India. In the year 1025, Mahmud laid siege against
Somnath temple and the nearby fort in Gujrat; from this military success, he sent thousands of prisoners of prisoners, including Indian intellectuals, back to Ghazni. These intellectuals, as well as his own library, helped Biruni develop an understanding of Indian civilization. == Content ==