What is disclosed is a semi-solid controlled release pharmaceutical composition containing biocompatible and bioerodible semi-solid lipid matrix incorporating local anesthetics agents to form a semi-solid solution, a method of using the pharmaceutical composition to treat, and a method of making the pharmaceutical composition.