PROVIDENCE, R.I. (WPRI) — A Warwick man will learn his fate later this year after he was convicted of dealing heroin.

Just as his trial was set to begin, 55-year-old Jose Manuel Rosario-Mella pleaded guilty Wednesday in federal court to possession with intent to distribute 100 grams or more of heroin and being a felon in possession of a firearm, according to the office of U.S. Attorney Zachary Cunha.

Rosario-Mella, who also went by Luis Cortes, was arrested following a month-long investigation by the Drug Enforcement Agency (DEA) and Warwick police, Cunha’s office said. They conducted a court-authorized search of his home and found a kilogram brick of heroin, a loaded 9mm pistol, ammunition, more than $337,000 in cash, and other items associated with drug distribution.

Rosario-Mella’s girlfriend and her two young daughters were inside the home at the time, Cunha’s office added.

Rosario-Mella is scheduled to be sentenced by a federal judge on April 13.