CHARLESTON, W.Va. -- A Texas doctor who reportedly traveled to Logan County every three months to run a pill mill admitted Tuesday to charges connected to the operation. Dr. Fernando Gonzales-Ramos, 47, pleaded guilty Tuesday before U.S. District Judge John T. Copenhaver to one count of conspiracy to distribute a controlled substance without a legitimate medical purpose. Prosecutors said that from September 2011 through March 2013, Gonzales-Ramos ran a cash-only pill trade in a Logan building that did not have running water, an exam table, or other medical equipment. He charged $450 to $500 for prescriptions for controlled pills. After collecting the payments, Gonzales-Ramos directed an associate to make cash deposits into his personal bank accounts, prosecutors said. "Dr. Gonzales-Ramos was not operating a doctor's office, he was operating a drug den," U.S. Attorney Booth Goodwin said in a release. "For thousands of dollars in cash, he was pumping out prescriptions for thousands of units of powerful narcotics." On March 2, an FBI informant entered Gonzales-Ramos' building at 2130 Old Logan Road and paid $450 in exchange for a prescription for the painkiller hydrocodone. Gonzales-Ramos did not examine the informant, who walked out with the prescription in less than three minutes The next day, law enforcement officials searched the building and found several people inside, waiting to get prescriptions. Authorities said that a bodyguard armed with a gun accompanied Gonzales-Ramos, according to a news release. As part of Tuesday's plea agreement, Gonzales-Ramos has agreed to surrender his Drug Enforcement Administration Certificate of Registration. He faces up to 71 months in prison when he is sentenced on Aug. 14. Reach Zac Taylor at email@example.com or 304-348-5189.