In the
Millennium trilogy, the pah-wraiths blow up the universe in order to end the Wormhole Aliens' war and reunite the sundered Celestial Temple. Good for the pah-wraiths, bad for everyone else. The Prophets have apparently been keeping our reality safe by denying the pah-wraiths their attempt to bridge the gap (these are the mainstream pah-wraiths, by the way, not Kosst Amojen and co, who are a rogue minority). The universe was created when the Temple split, and the orbs (or something very much like them, as seen in "Emissary" exiting the wormhole) were already in the Temple beforehand (the Wormhole Aliens don't even know where they come from). Oh, and a Bajoran priest is actually working for/with/against the Wormhole Aliens to ensure the universe is destroyed, and then saved by Sisko and co, so that a time-ship from the alternate future in which the universe blows up will travel back and found the mainstream Bajoran religion. So the universe blows up but then doesn't but still did in a future which spat a ship into the past and started it all. Yes, it's
that sort of story.

The Bajoran priest in question blew up the universe to ensure a stable time loop remained stable (a time loop drawing on
multiple timelines at once) and he outsmarted his own gods to do so, giving them what they wanted, furthering their agenda only to then undo it all. That always leaves me grinning. TV Tropes has a "Badass Preacher" page; maybe I should add him...
I don't know if I was meant to reach this conclusion, but I read the Prophet's repeated assertion in the trilogy that "we always win" as carrying a double meaning - not only one of their usual explanations of time but also hinting at an emotional truth. They win either way, because on one level they want the pah-wraiths to succeed even though they work to stop them...