as luck would have it

Prepositional phrase

 * 1)  by good fortune; fortunately or luckily.
 * I didn't plan to stop there, but as luck would have it, they were open when I went by.