Detectives arrested a Dorchester man in Braintree earlier this week when he allegedly arrived to deliver heroin and instead found police waiting behind the door.
Luis M. Perez, 26, was charged with charged with possession of heroin with intent to distribute and resisting arrest after police took him into custody following a brief struggle, Deputy Chief Russell Jenkins said in a statement.
The detectives, from Braintree, Quincy and Weymouth, were "lying in wait," Jenkins said, at an undisclosed location at 7:30 p.m. on Wednesday night. Jenkins said he declined to provide the location because the investigation is ongoing.
"Perez allegedly attempted to swallow the drugs, but detectives were able to recover two bags of heroin and $694 in cash," Jenkins said.