Footnote d Psalm 45 also gives an indication of the sequence of events. First the King fights the war, and then the marriage takes place.