Emirate of Bukhara
Ayni was born in a peasant family in the village of Soktare in what was then the Emirate of Bukhara. He became an orphan at 12 and moved to join his older brother in Bukhara, where he attended a madrasa and learned to write in Arabic.