In 899, the Qarmatians, a millenarian Ismaili Muslim sect, seized Bahrain, seeking to create a utopian society based on reason and redistribution of property among initiates. Thereafter, the Qarmatians demanded tribute from the caliph in Baghdad, and in 930 sacked Mecca and Medina, bringing the sacred Black Stone back to their base in Ahsa, in medieval Bahrain, for ransom. According to historian Al-Juwayni, the stone was returned 22 years later in 951 under mysterious circumstances. Wrapped in a sack, it was thrown into the Great Mosque of Kufa in Iraq, accompanied by a note saying "By command we took it, and by command we have brought it back." The theft and removal of the Black Stone caused it to break into seven pieces.