Luke 2:4-5

4 So Joseph also went up from the town of Nazareth in Galilee to Judea, to Bethlehem the town of David, because he belonged to the house and line of David.
5 He went there to register with Mary, who was pledged to be married to him and was expecting a child.