to avoid the danger of sth happening
for fear of sth / of doing sth
We spoke quietly for fear of waking the guards.
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition