WATERBURY — A city man was sentenced Friday to just over a year in federal prison for his role in a cocaine trafficking operation, the U.S. Attorney said.

Desny Sosa-Hernandez, 41, was sentenced to 12 months and one day in federal prison, followed by three years of supervised release, according to a news release from the office of U.S. Attorney for Connecticut John Durham.

The charges against him stemmed from last March.

Law enforcement officers set up two controlled purchases of cocaine in Bridgeport in March 2019 from Sosa-Hernandez and his co-defendant, Edgard Martinez, according to authorities.

On March 19, 2019 — after investigators set up the purchase of 300 grams of cocaine from the two men — Martinez drove from his Tolland residence to pick up Sosa-Hernandez in Waterbury, Durham said.

The two then planned to drive to Bridgeport together to finalize the drug transaction, authorities said. But when Martinez showed up at Sosa-Hernandez’s home in Waterbury, investigators took them both into custody and seized a bag with 300 grams of cocaine inside Martinez’s vehicle, Durham said.

Authorities said when they searched Sosa-Hernandez’s house, they found shoe boxes with $18,111 in cash; and a search of Martinez’s home led investigators to a handgun, cocaine and items used to process and package drugs.

Sosa-Hernandez pleaded guilty to conspiracy to possess with intent to distribute, and to distribute, cocaine on Nov. 6, 2019. He was released on a $100,000 bond and told to report to prison on Sept. 16.

Martinez pleaded guilty to conspiracy to possess with intent to distribute, and to distribute, cocaine, and possession of a firearm by a previously convicted felon. He was sentenced in May to serve 29 months in federal prison.