15 Then from his mouth the serpent spewed water like a river, to overtake the woman and sweep her away with the torrent. 16 But the earth helped the woman by opening its mouth and swallowing the river that the dragon had spewed out of his mouth.
From these verses it's clear that the devil tries everything in his power to destroy the church, represented by the female figure in these verses, (either Israel or Christianity or symbolic of both). This includes trying to kill her infant son, Jesus, whom God took into the safety of heaven.