An abuse deterrent pharmaceutical composition comprising: (a) an active ingredient (b) deterrent agent (c) pH dependent soluble ingredient and (d) pH modifying agent wherein deterrent agent is not release in effective amount to produce its intended aversive effect upon correct administration but it release in effective amount to produce its intended aversive effect upon incorrect administration.