Two former Los Angeles County sheriff’s deputies were charged Wednesday for allegedly planting guns as evidence inside a medical marijuana dispensary to justify an arrest.

Julio Cesar Martinez and Anthony Manuel Paez each face one felony count of conspiracy to obstruct justice and altering evidence as a peace officer, the Los Angeles County District Attorney’s Office said. Martinez is also charged with two court of perjury and one count of filing a false report.

On Aug. 24, 2011, Martinez and Paez wrote a report claiming they were patrolling West 84th Place in Los Angeles when they witnessed a drug deal, according to prosecutors. The report said one of the men was carrying a gun, according to the Los Angeles County District Attorney's Office.

Prosecutors claimed that Martinez said he followed a man inside a medical marijuana dispensary where he found one gun in a trash bin and another on top of a desk next to Ecstasy pills.

One man was arrested for possession of an unregistered firearm, while another was detained for possession of a controlled substance while armed. Charges against these men have since been dropped, said Jane Robinson, a spokeswoman for the district attorney’s office.

A year after the incident, the Los Angeles County Sheriff’s Department’s Internal Criminal Investigation Bureau launched an inquiry and discovered a video recording taken inside the dispensary. Investigators found that the Martinez and Paez statements were inconsistent with what they saw on the video, prosecutors said.

Martinez and Paez are scheduled to be arraigned June 17. If convicted, they could face more than seven years in state prison.

It was not immediately cleared whether the deputies obtained an attorney.