Joseph and Mary were living in Nazareth when the angel Gabriel announced to Mary that she would soon give birth to the Messiah. Then a census was decreed by Caesar Augustus, which required Joseph and Mary to travel about 70 miles (110 km) to Bethlehem, the town of their ancestor David, to be registered. There Mary gave birth to Jesus and laid him in a manger. Nearby shepherds were living in the fields with their sheep, and an angel of the Lord appeared to them and announced that the Messiah had been born in Bethlehem. They went and found Mary, Joseph, and baby Jesus just as the angel had said, and they went and spread the news about what they saw. Then the shepherds returned to their fields, glorifying and praising God. Eight days after Jesus was born, Joseph and Mary took Jesus to the Temple in Jerusalem to be circumcised, in keeping with Genesis 17:1-14. A few weeks later Joseph and Mary went back to the Temple a second time with Jesus so that Mary could undergo the purification rites for childbirth and Jesus could be consecrated to the Lord with a sacrifice for the firstborn son (Exodus 13:1-13; Leviticus 12). While they were there a righteous and devout man named Simeon was moved by the Spirit to come into the Temple courts, and he took Jesus into his arms during the consecration ceremony and praised God for sending the Messiah to save his people. Immediately after this a prophet named Anna, who had lived in the Temple ever since her husband had died decades earlier, came up to Joseph and Mary and gave thanks to God, and she spoke about Jesus to all who were looking forward to the redemption of Jerusalem. Sometime later, after Joseph and Mary had done all that was required in the law, they returned with Jesus to their hometown of Nazareth in Galilee.