The word is derived from the name Simon Magus, a converted magician, who tried to buy the Gifts of the Holy Ghost from Saint Peter the Apostle, in the first years of the Church (Acts 8). Simony is the sacrilegious vice of purchasing ecclesiastical offices and benefices to which spiritual jurisdiction is attached. It was common during the Middle Ages, but especially in the 9th and 10th centuries, and was one of the remote but powerful causes of the Protestant revolt in the 10th century. Episcopal sees were bought by profligate men without training and even without Orders. The Church has repeatedly and strongly condemned this vice in the encyclicals of Popes and Synods, but never was her condemnation more strong than in the decrees of Pope Saint Gregory VII.