A few decades after the death of Brahmagupta, Sindh came under the Arab Caliphate in 712 CE. Expeditions were sent into "Gurjaradesa" (""Al-Baylaman" in "Jurz"", as per Arab historians). The kingdom of Bhillamala seems to have been annihilated but Ujjain repulsed the attacks. The court of Caliph Al-Mansur (754–775) received an embassy from Sindh, including an astrologer called Kanaka, who brought (possibly memorised) astronomical texts, including those of Brahmagupta. Brahmagupta's texts were translated into Arabic by Muhammad al-Fazari, an astronomer in Al-Mansur's court under the names "Sindhind" and "Arakhand". An immediate outcome was the spread of the decimal number system used in the texts. The mathematician Al-Khwarizmi (800–850 CE) wrote a text called "al-Jam wal-tafriq bi hisal-al-Hind" (Addition and Subtraction in Indian Arithmetic), which was translated into Latin in the 13th century as "Algorithmi de numero indorum". Through these texts, the decimal number system and Brahmagupta's algorithms for arithmetic have spread throughout the world. Al-Khwarizmi also wrote his own version of "Sindhind", drawing on Al-Fazari's version and incorporating Ptolemaic elements. Indian astronomic material circulated widely for centuries, even passing into medieval Latin texts.