in the way that chance decides what will happen
As luck would have it, the train was late.
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition