NEWARK — A city man turning himself in on a minor wandering charge Tuesday was carrying large stashes of both cocaine and heroin at the time, according to authorities.

Carl Miller, 42, had been wanted on a criminal warrant for wandering in a known drug area, and arrived at Veterans Courthouse with the intent to turn himself in, Essex County Sheriff Armando Fontoura said in a statement.

Detectives obliged, and began a routine pat-down to check for contraband that turned up 47 glassine envelopes of heroin and 17 vials of cocaine, which had been hidden in Miller’s underpants, according to Fontoura.

As a result, Miller was booked on two counts each of possession of a controlled substance and possession of a controlled substance with intent to distribute within 1,000 feet of a school. The courthouse is close to Newark Tech, one of Essex County’s vocational-technical schools.

"Every arrest should be this simple,” Fontoura said.

After being arraigned on the new charges this morning, Miller is being held at the Essex County Jail on a $50,000 cash bond.