For centuries, and all through the Middle Ages, the Church remained in peaceful possession of the doctrine of the priesthood and that of the Eucharistic Sacrifice. The Protestantism of the 16th century brought that peace to an end. By their revolt against the Catholic Church, Luther and the other reformers rejected the Magisterium of the Church and put the Bible in its place: sola scriptura. They rejected as well-----and that was logical-----the Divine origin of her hierarchy and the Sacramental character of her priesthood. They denied that the bread and wine are substantially and totally changed into the Body and Blood of Christ and that the Mass is a true Sacrifice. The Catholic Mass was even one of Luther's "bete noires," and he fought against it all his life. Faced with such extensive disagreements, the Church had to affirm her age-long doctrine; and that she did in the Council of Trent . . .  The doctrine of the Council of Trent has the great merit of being clear, unambiguous, definitive. It is presented as the Catholic doctrine of all time; it demands our complete and unconditional assent. Apart from the Council of Trent the Church has never pronounced with its solemn and infallible magisterium on the ministerial priesthood and the Sacrifice of the Mass which is indossolubly united with it. Until the Council of Trent there had been no need to do so; after the Council, she felt no need as the Council had expressed itself so clearly and so solemnly. It is important to notice that Trent pronounced first on the Sacrifice of the Mass and only afterwards on the priesthood, in words partly the same. It is above all the Sacrifice of the Mass which determines what the priest is. The power of offering it was given at the Last Supper.
The are nine specific canons of The Council following the dogmatic declaration on the Mass . . . we note the first three:
1. If anyone shall say that in the Mass a true and real Sacrifice is not offered to God, or that this offering is only in the fact that Christ is given to us to eat: let him be anathema.
2. If anyone shall say that by the words: 'Do this in commemoration of Me' Christ did not institute the Apostles priests, or did not ordain that they and other priests should offer His Body and Blood: let him be anathema.
3. If anyone shall say that the Sacrifice of the Mass is only one of praise and thanksgiving, or that it is a mere commemoration of the Sacrifice consummated on the Cross, and not propitiatory; or that it profits only him who receives Communion and ought not to be offered for the living and the dead, for sins, punishments, satisfactions and other necessities: let him be anathema.

A year later, on July 15, 1563, the same Council promulgated its text of the Catholic doctrine of order [the priesthood]:

The true and Catholic doctrine . . . to condemn the errors of our time . . . Sacrifice and priesthood are by ordinance of God so united that both have existed in every law. Since, therefore, in the New Testament the Catholic Church has received from Christ the holy, visible sacrifice of the Eucharist, it must also be confessed that there is in that Church a new, visible and external priesthood into which the old has been translated. That this was instituted by the same Lord our Saviour, and that to the Apostles and their successors in the priesthood was given the power of consecrating, offering, and administering His Body and Blood, as also of forgiving and retaining sins, is shown by the Sacred Scriptures and has always been taught by the Tradition of the Catholic Church . . .
That doctrine is also affirmed with anathema in the canons that followed the above declaration, the fourth of which stated that Holy Orders imprinted a character.