Pope Paul VI
Sacerdotalis Caelibatus §36
Sacerdotalis Caelibatus: On the Celibacy of the Priest
36 From the beginning of the 4th century, the Church of the West strengthened, spread and confirmed this practice by means of various provincial councils and through the supreme pontiffs. (72) More than anyone else, the supreme pastors and teachers of the Church of God, the guardians and interpreters of the patrimony of the faith and of holy Christian practices, promoted, defended, and restored ecclesiastical celibacy in successive eras of history, even when they met opposition from the clergy itself and when the practices of a decadent society did not favor the heroic demands of virtue. The obligation of celibacy was then solemnly sanctioned by the Sacred Ecumenical Council of Trent (73) and finally included in the Code of Canon Law. (74)
Source: Sacerdotalis Caelibatus (Vatican.va)