why did Muhammad retreat to a cave outside of Mecca?

A He wanted to escape corrupt Meccan society
B He was looking for wisdom from god
C he had been told by an angle to go there
D he was hiding from his persecutors

D he was hiding from his persecutors