In the future, mankind manages to colonize the relatively close habitable planets, but only have near-FTL travel, so traveling between planets still takes years and is done in supermassive spaceships.
Aliens invade from another dimension, striking most human settlements simultaneously, overwhelming the human defense that can't coordinate against it.
A maniac scientist on Earth curses fate and, working covertly, creates a plan to destroy the invaders that will take centauries and involves sending payloads to all the human settlements that are timed to arrive at relatively the same time, but he keeps it covert, never telling his collaborators the full story, only saying:
>If God won't answer our prayers then they will.
Fast-forward to when the payloads arrive, and it turns out each one contains thousands of inert battle suits which seemingly crash to the surface of the worlds without activating. However, a few do turn on when humans around them pray to be delivered after centauries of suffering and wreck havoc on the invaders coordinating to an insane degree across light-years of distance. As it turns out, humans could never defeat the invaders because they can share information instantaneously through their own dimension and shift around their weak points in the same way so their war machines are never truly destroyed. The suits each contain a human corpse, taken from one of the cryobanks from the supermassive ships that went off-course during the invasion and somehow have formed a network of consciousness that responds to human piety. Thus, the networked human consciousness can finally mount an offensive against the invaders, assuming that humanity still is at least willing to hope for a future.

In short, pray for answer.