A former cop allegedly fell from grace into the world of theft and drugs.

Former Somerville Police Officer Samuel Stanford was arraigned in Somerville District Court on drugs and gun charges on Thursday afternoon. 

Stanford was fired from the force in July for an opioid addiction. Two weeks later, police say they caught Stanford on video breaking into the Somerville Police headquarters. He is accused of breaking into a commanding officer’s locker and stealing his gun. 

RELATED: No gun permits, criminal records for alleged Pokemon 'gunmen'​

Stanford was charged with breaking and entering in the nighttime, drug possession and possession of ammunition without an FID card and was held on $25,000 cash bail. He scheduled the next court hearing in his case for Monday, Sept. 21. 

Stanford is said to have stolen Lt. Joseph McCain’s department-issued .40-caliber Sig Sauer, which has since been recovered. 

RELATED: WTF: Bill hopes to criminalize necrophilia... because it's not a crime

Police raided Stanford’s apartment, and reportedly found Somerville police uniforms, citations booklets, three boxes of .40-caliber ammo, a .38-caliber Smith & Wesson handgun two bags of heroin, and a lockbox found in a hamper of dirty clothes with 173 Percocet pills, $20,000 cash and more .40-caliber ammo. 

He shared the apartment with his brother, Edward Stanford. Edward Stanford pleaded not guilty to drug possession and possession of ammo without an FID card.

Edward Stanford was held on $500 is scheduled for a court hearing in his case for Tuesday, Oct. 6.

Police said he used an access code to enter the station and a piece of cloth to prop the door open.