Memory Alpha quotes Ira Steven Behr from the DS9 Companion:
"I felt it was the perfect next step in the evolution of the relationship between Sisko and the Prophets that began in the pilot. Hearing people refer to it as some dopey deus ex machina is really annoying because I would think they'd give us more credit for being on the ball. ...This was the man going out into the wilderness and demanding God to interfere, to do something for crying out loud
errrr....Not really Ira. Actually it was Sisko seizing an opportunity. Apparently it didn't even occur to him to ask 'God' for help until the moment arrived. That's almost the opposite of going out into the wilderness.
As for, was it a 'bad' ending? No, not at all. Don't f*** with the Feds. They know *real* Gods.