DENVER (Reuters) - A former surgical technician who is HIV-positive pleaded guilty on Tuesday to tampering with narcotics at a Colorado hospital, potentially exposing thousands of patients to blood-borne diseases, including the AIDS virus, federal prosecutors said.

Authorities said Rocky Allen, 29, was caught switching a syringe filled with fentanyl citrate, a powerful synthetic painkiller, with a dose of an unknown substance during a patient’s surgery in January at the Swedish Medical Center in suburban Denver.

“Because access to fentanyl at hospitals is restricted, the defendant would usually only have access to it when a syringe was drawn for use on a patient during an ongoing surgery,” prosecutors wrote in a court filing in the case.

The hospital immediately fired Allen and notified 2,900 patients who underwent surgery at the facility between August 2015 and January 2016, the time frame when Allen was employed there, to undergo free screenings for HIV and for hepatitis B and C.

Allen pleaded guilty in U.S. District Court in Denver to a two-count felony indictment accusing him of tampering with a consumer product and of obtaining a controlled substance by deceit, said Victoria Soltis, spokeswoman for U.S. Attorney John Walsh.

Allen, who remains free on a $25,000 bond, faces up to 14 years in prison when he is sentenced on Oct. 13, Soltis said.

After his termination, a state regulatory board revoked Allen’s medical technologist's license, noting he tested positive for fentanyl and marijuana.

Authorities at first said Allen was a carrier of an unidentified “blood-borne pathogen” but later disclosed that he was HIV positive.

There are no reports of any people who were treated at the hospital testing positive for the diseases, but three former patients are suing the hospital for negligence in its hiring of Allen, who federal authorities said had a long history of drug theft.

In court filing, prosecutors said Allen was suspected of stealing painkillers from hospitals or medical clinics in Washington state, Arizona and California.

While in the U.S. Navy, prosecutors said, Allen was court-martialed and convicted in 2011 of stealing 30 vials of fentanyl, while deployed at an Army hospital in Afghanistan.

The U.S. Centers for Disease Control and Prevention classifies fentanyl as a synthetic opioid 50 to 100 times more potent than morphine. Rock musician Prince died of an accidental overdose of the narcotic at his Minnesota home in April.

(Editing by Steve Gorman and Leslie Adler)