With the Prophets nothing they ever did was seen or displayed as being scientific. It was always mystical.
That's grossly untrue. The Bajorans interpreted them as mystical, but the Starfleet characters routinely characterized them as wormhole aliens. Several episodes explicitly revolved around the different characters' different perceptions of what the wormhole's inhabitants really were. This passage from "The Reckoning" sums it up pretty well:
DAX: You know how Starfleet feels about this Emissary thing. It makes them very uncomfortable that you've allowed the Bajorans to view you as a religious icon. It used to make you uncomfortable, too.
SISKO: Not anymore. I guess the Prophets have spoken to me one too many times.
DAX: I remember when you used to call them wormhole Aliens.
SISKO: Wormhole aliens or Prophets, it really doesn't matter. The fact is, they exist out of time, and over the centuries they've given the Bajorans glimpses of the future. Glimpses that the Bajorans have written down to help them guide succeeding generations. If whatever is written here can help me avoid mistakes, can help me make the right decisions, then I'd be a fool to ignore it.
DAX: Fair enough. But if you don't mind, I'm going to continue to think of them as wormhole aliens.
SISKO: All I know is that they have a relationship with Bajor that stretches back over a thousand years.
The show always took care to leave it ambiguous whether the Prophets were genuinely spiritual or simply advanced aliens ("sufficiently advanced" in a Clarke's Third Law sense) whose seeming prophetic powers were scientifically explicable by their existence in a different time continuum. Indeed, I'm pretty sure they were required
by the studio to leave in that ambiguity, because overt religious elements make advertisers nervous. So there were always two possible interpretations: the scientific one favored by the Federation (with everything explicable within the fairly loose scientific laws of the Trek universe) and the more spiritual one favored by the Bajorans. And ultimately it didn't matter which one was objectively true, because what mattered was how the various characters' interpretations influenced their choices and actions.
Deus Ex Machina being a greek term should extend to divine intervention since gods would be used to settle the plot of a dispute in greek plays and writings
Yes, but my point is that just having divine intervention doesn't automatically make something a deus ex machina
in the literary-trope sense. We're not talking about the literal usage coined over 2000 years ago; that would be pointlessly archaic. We're talking about its definition as a term of criticism, which refers to the arbitrary introduction of a random new element into a story that conveniently solves a crisis that the characters were unable to solve on their own. A deus ex machina doesn't have to involve divine intervention; for instance, if a killer is chasing our hero through an open field, and a piece of wing falls off a conveniently passing jet and hits the killer on the head, that's a deus ex machina, because it comes out of nowhere and solves the problem without the hero having to do anything. But conversely, divine action isn't necessarily a DEM; if a story is about
gods in the first place, such as, say, Clash of the Titans
, then their actions to resolve a situation are not DEM because they're actual characters in the story and their presence is set up well in advance.
So don't take the name of the trope so dang literally. That's missing the whole point. The issue isn't about divinity. It's about whether a writer cheats to solve a problem rather than finding a legitimate solution within the story.
I was going to vote no but before I voted I realized I had to look up the meaning of Dues Ex Machina since I didn't know it. After I read the definition below, especially the bold, italicized, underlined parts, I voted yes. If you read just the bold, italicized, underlined parts, they the ending to a T.
Deus Ex Machina definition according to Google: An unexpected power or event saving a hopeless situation, esp. as a plot device in a play or novel.
You can't pick and choose parts of the definition -- nor is that Google definition particularly good. It's not just unexpected, it's something that's arbitrarily introduced without prior justification. It's when the writer can't think of a way out of the problem and just makes up some random thing out of the blue that conveniently fixes everything without the heroes having to do anything. That's not the case here. The wormhole aliens had been an established part of DS9's world since the beginning. We already knew they were there and had the power to do this. And it was the actions of the hero -- Sisko persuading the Prophets to act -- that led to the resolution. So no, it absolutely was not a deus ex machina. You were right to realize you needed to look up the definition, but you need to choose your sources more carefully.