During Ma'mun's reign several scholars, such as al-Biruni, resided in Khwarazm, and in fact one of Mahmud's demands upon the shah was that several of them be sent to him.
Several scholars, including al-Biruni, resided in Khwarazm during Ma'mun's reign. Additionally, one of Mahmud's demands from the shah was that he provide several of these scholars for his use.