God Ineffable — whose ways are mercy and truth, whose will is omnipotence itself, and whose wisdom “reaches from end to end mightily, and orders all things sweetly” — having foreseen from all eternity the lamentable wretchedness of the entire human race which would result from the sin of Adam, decreed, by a plan hidden from the centuries, to complete the first work of his goodness by a mystery yet more wondrously sublime through the Incarnation of the Word. This he decreed in order that man who, contrary to the plan of Divine Mercy had been led into sin by the cunning malice of Satan, should not perish; and in order that what had been lost in the first Adam would be gloriously restored in the Second Adam.
From the very beginning, and before time began, the eternal Father chose and prepared for his only-begotten Son a Mother in whom the Son of God would become incarnate and from whom, in the blessed fullness of time, he would be born into this world. Above all creatures did God so loved her that truly in her was the Father well pleased with singular delight. Therefore, far above all the angels and all the saints so wondrously did God endow her with the abundance of all heavenly gifts poured from the treasury of his divinity that this mother, ever absolutely free of all stain of sin, all fair and perfect, would possess that fullness of holy innocence and sanctity than which, under God, one cannot even imagine anything greater, and which, outside of God, no mind can succeed in comprehending fully.
[...] We declare, pronounce, and define that the doctrine which holds that the most Blessed Virgin Mary, in the first instance of her conception, by a singular grace and privilege granted by Almighty God, in view of the merits of Jesus Christ, the Savior of the human race, was preserved free from all stain of original sin, is a doctrine revealed by God and therefore to be believed firmly and constantly by all the faithful.
Pope Bl. Pius IX, Apostolic constitution Ineffabilis Deus (The Immaculate Conception), 1854