The Church has always been against slavery, with plenty of evidence to prove it. .
How then would you explain the following:
1089 AD
The Synod of Melfi under Pope Urban II imposed slavery on the
wives of priests.
1179 AD
The Third Lateran Council imposed slavery on those helping the
Saracens.
1454 AD
Through the bull Romanus Pontifex, Pope Nicholas V authorises
the king of Portugal to enslave all the Saracen and pagan peoples
his armies may conquer.
1493 AD
Pope Alexander VI authorises the King of Spain to enslave non-
Christians of the Americas who are at war with Christian powers.
1866 AD
The Holy Office in an instruction signed by Pope Pius IX
declares: Slavery itself, considered as such in its essential nature,
is not at all contary to the natural and divine law, and there can
be several just titles of slavery, and these are referred to by
approved theologians and commentators of the sacred canons …
It is not contrary to the natural and divine law for a slave to be
sold, bought, exchanged or given".
(See J.F.Maxwell,
The Development of Catholic Doctrine concerning Slavery
World Jurist 11 (1969-70) pp. 147-192 and 291-324. )
and God allowed slavery in the Old Testament. For example,
Leviticus 25:44-46: “Your male and female slaves are to come from the nations around you; from them you may buy slaves. You may also buy some of the temporary residents living among you and members of their clans born in your country, and they will become your property. You can will them to your children as inherited property and can make them slaves for life, but you must not rule over your fellow Israelites ruthlessly.”
So the teaching on slavery has changed.