Mary is prefigured in the Old Testament.
When God speaks to the serpent after the Fall of Adam and Eve, we learn
in Genesis 3:15 of the promise of a Redeemer from the woman,
"I will put enmity between you and the woman,
between your offspring and hers,
He will crush your head,
while you strike at his heel."
Eve herself, "the mother of all the living (Genesis 3:20)" prefigures Mary. The Matriarchs of the Old Testament also foreshadow Mary and Elizabeth in the New Testament, as Sarah and Hagar, Rachel and Leah, and Hannah and Peninnah. Hagar the Egyptian maid had Ishmael (Genesis 16:15) by Abram, and Sarah had Isaac (Genesis 21:2) when he was called Abraham, after God established his Covenant with him, making him a father of a host of nations. Rachel and Leah were the daughters of Laban, and Leah had six of Jacob's twelve sons, but it was Rachel who had his eleventh son Joseph (Genesis 30:24). Peninnah had many children for Elkanah, but it was the barren Hannah who bore Samuel (1 Samuel 1:20). The hymn of Hannah in the First Book of Samuel 2:1-10 is a source for the Magnificat of Mary.
The books of Esther and Judith portray two heroines of Israel. Each of these women, with their sense of survivability and indestructible spiritual strength, personify Israel itself. In fact, woman and Israel become interchangeable in the Book of Hosea, where the marriage of Hosea to his unfaithful wife is symbolic of God's Covenant of love with the unfaithful people of Israel (Hosea 11:1-9).
The rich background in the Old Testament predisposes one to understand the whole history of Israel looks to its fulfillment in the Messiah. Mary, the young Jewish virgin, becomes a symbol for Israel herself, the one that bore Jesus, the Messiah. Mary becomes "daughter Zion" (Isaiah 54:1-10, Zephaniah 3:14, Zechariah 2:10) in the New Testament.
Then God's temple in heaven was opened, and the ark of his covenant could be seen in the temple. There were flashes of lightning, rumblings, and peals of thunder, an earthquake, and a violent hailstorm.
A great sign appeared in the sky, a woman clothed with the sun, with the moon under her feet, and on her head a crown of twelve stars. She was with child and wailed aloud in pain as she labored to give birth.
Then another sign appeared in the sky; it was a huge red dragon, with seven heads and ten horns, and on its heads were seven diadems. Its tail swept away a third of the stars in the sky and hurled them down to the earth. Then the dragon stood before the woman about to give birth, to devour her child when she gave birth.
She gave birth to a son, a male child, destined to rule all the nations with an iron rod. Her child was caught up to God and his throne. The woman herself fled into the desert where she had a place prepared by God, that there she might be taken care of for twelve hundred and sixty days.