 Toward the end of the 9th century, as the central authority of the Abbasid Caliphate weakened, Muhammad was able to form a virtually independent state.Much of the Sajids' energies were spent in attempting to take control of neighboring Armenia.The dynasty ended with the death of Abu'l-Musafir al-Fath in 929.