Williamsville pain doctor Eugene Gosy is being allowed to return to his pain management practice, including recommending controlled medications to his patients.
U-S Magistrate Court Judge Kenneth Schroeder ruled that closing Gosy's pain management clinic would be a danger to the community.
In early May, Gosy was arrested on federal charges of writing thousands of illegal prescriptions.
Gosy still cannot directly prescribe medications, but he can make recommendations to other physicians on the clinic staff.
Judge Schroeder asked "What is the alternative... do nothing and make ten thousand people suffer?"
Gosy's pain management clinic is one of the largest in the state.