Samuel Stanford

Samuel Stanford posted this self-portrait to Facebook on Aug. 14.

A former Somerville police officer and his brother were arraigned Thursday in Somerville District Court, with the former officer accused of breaking into Somerville Police Headquarters after his dismissal and stealing a commanding officer’s gun. Leading up to their arrest, police searched their home and reported finding drugs, cash and other items, building a case that the former officer was going into business as a drug dealer.

Samuel Stanford’s appointment to the Somerville police was approved in late May 23, 2013, and he was terminated by the department July 23, according to a press release from Middlesex District Attorney Marian Ryan and Somerville Police Chief David Fallon.

On Aug. 4, a Somerville police officer reported his firearm had been stolen from a locker inside the men’s locker room at Somerville Police Headquarters, according to the release. Detectives investigated and found that the day before, Stanford had made an unauthorized returned to the building, gone to the locker room and left.

A search warrant was executed Aug. 25 at the home Stanford shared with his brother, Edward Stanford. Police report finding about 150 tablets of Percocet containing Oxycodone; a substance believed to be heroin; $20,000 cash; ammunition; and other items. The Stanfords were arrested at the scene.

The gun was recovered by Somerville police, prosecutors said Thursday in court.

According to media reports, Stanford was fired because he was addicted to opioids.

“This is still an active investigation,” Ryan said. “We continue to look into why Samuel Stanford reportedly entered the police station after he was terminated and we continue to investigate the circumstances concerning the discovery of drugs and ammunition at the residence he shared with his brother.”

Judge Maurice Flynn III set bail at $25,000 cash for Samuel Stanford and scheduled his next hearing for Sept. 21. The judge set bail at $500 cash for Edward Stanford and scheduled the next court hearing in his case for Oct. 6.

The former officer faces charges of breaking and entering in the nighttime with intent to commit a felony, possession of ammunition without a firearm identification card, possession of a Class A substance (heroin), and possession with intent to distribute a Class A substance (Oxycodone).

Edward Stanford, 25, faces charges of possession of ammunition without a firearm identification card, possession of a Class A substance (heroin), and possession with intent to distribute a Class A substance (Oxycodone).

The brothers reportedly pleaded not guilty.