Now this is how the birth of Jesus Christ came about. When his mother Mary was betrothed **to Joseph, but before they lived together, she was found with child through the holy Spirit. Joseph **her husband, since he was a righteous man, yet unwilling to expose her to shame, decided to divorce **her quietly...
...When Joseph awoke, he did as the angel of the Lord had commanded him and took **his wife into his home.
- Gospel of Matthew*
As we can see, in Jewish tradition, being betrothed was actually being married. There was a period of betrothal where the couple would not be living together however they were considered married. If they were not considered married then Joseph would not have needed to divorce her to separate from her. The Gospel also immediately after stating Mary and Joseph were betrothed calls Joseph her husband and Mary his wife.
The mistake that many make is equating betrothal to modern engagement. However they are not equivalent. Betrothal is simply the period of time before the married couple lived together. This gap in time could have been for any number of reasons however the couple was considered legally married during that time.