Formulation comprising buprenorphine or a pharmaceutically acceptable salt thereof as the sole active ingredient, a viscosity enhancer, and a buffering agent in an amount to provide a pH of from 5.0 to 7.0 are useful for treating opioid withdrawal syndrome.