All this took place so that what was spoken by the Lord through the prophet (prophētou | προφήτου | gen sg masc) might be fulfilled:
Reference
Matthew 1:22
Sequence
1