TAUNTON — A 32-year-old Taunton man, who was already serving a suspended sentence after pleading guilty to drug offenses earlier this year, was arrested on Wednesday after trafficking cocaine, police said.

James Tavares, who lives in an apartment at Country Village Estates, was arrested on charges of trafficking cocaine and committing a drug violation near a school or park, after a search warrant was executed at his home on Wednesday morning, Taunton police said. Tavares was already serving a suspended six-month sentence after pleading guilty on Jan. 31 in a case stemming from a September 2012 arrest in Taunton on charges of conspiracy to violate the drug laws, possession with intent to distribute a Class D drug (marijuana), possession of a Class B drug (cocaine), possession of a Class B drug (suboxone) and carrying a dangerous weapon.

Tavares was arraigned in Taunton District Court on Wednesday afternoon and was ordered held on a $10,000 bail that was agreed to by the prosecutor and a bail lawyer, then approved by Judge Kevan Cunningham, who cited the nature of the allegations and the potential penalty.

Taunton police arrived at his Country Village Estates apartment to execute a search warrant at 11:42 a.m. on Wednesday, and could hear his television and a voice coming from inside, a police report said. After no one answered a knock on the door, police used a battering ram to get inside, finding Tavares taking a shower.

After he put on a bathrobe, Tavares was seated in the kitchen and said he wanted to talk to police, showing them where the cocaine was hidden in a pillow on his bed. Police confiscated two bags of cocaine, totaling 21.6 grams, which investigators said was worth $2,100 on the streets, in addition to about $1,340 in cash, three cellphones and a digital scale.

The apartment is located less than 800 feet from Bristol-Plymouth Regional Technical School, so Tavares also faces the charge for selling near a school area, police said.

Tavares was free on a suspended six-month prison sentence, which was supposed to last 18 months before it would have been thrown out, but he was arrested on Wednesday again, after just after, police said. In Taunton District Court, Judge Thomas Finnegan issued that suspended sentence, which came after Tavares was arrested in the parking lot of Weir Fruit in Taunton, where he was dealing marijuana but was found with other drugs, including cocaine.

Before that, Tavares was previously found guilty and served a 90-day prison sentence for possession of Class C drugs (vicodin) and possession of a Class D drug; and also three months in prison for possession with intent to distribute a Class B drug, possession with intent to distribute a Class D drug and possession of a Class B drug (Percocet).

Tavares is next due in court on June 9 for an appointment of attorney hearing.