Unless obedient, faithful, praying people petition Him. There are many many instances in His book that tell of evil being thwarted because His people were obedient, faithful and because they prayed.
The Scriptures are replete with examples...the Exodus, the walls of Jericho tumbling, Paul and Silas being released from prison...those are just off the top of my head!