The Gnostic social-religious movement and doctrine originated in the time of Peter I of Bulgaria (927–969), alleged in the modern day to be a reaction against state and clerical oppression of the Byzantine church. In spite of all measures of repression, it remained strong and popular until the fall of the Second Bulgarian Empire in the end of the 14th century. Bogomilism was an outcome of many factors that had arisen in the beginning of the 10th century, most probably in the region of Macedonia. It was also strongly influenced by the Paulicians who had been driven out of Armenia.