This invention provides methods and pharmaceutical compositions for preventing or treating physical dependence and/or withdrawal associated with narcotic use, in particular by modulating a 5-HT3 receptor. Using a computational genetic approach in mice, a gene conserved between mice and humans was identified as candidate as a modulator of physical dependence to morphine. Administration of compounds that modulate 5-HT3 receptors was found to control withdrawal from morphine in mice and humans.