ITHACA, N.Y. — A Trumansburg man pleaded guilty Monday to having drugs and guns when police executed a search warrant in his home last winter.

Devon C. Miller, 33, pleaded guilty to third-degree criminal possession of a controlled substance and third-degree criminal possession of a weapon.

On Feb. 24, Miller was arrested in his home after police said they found over two ounces of heroin, about half an ounce of crack cocaine, and about two ounces of cocaine. Officers also reported finding small amounts of marijuana, packaging equipment and three loaded handguns, two of which police said were stolen.

The plea deal reached between the prosecution and defense recommended that Miller serve six years in state prison for the charge of possession of a controlled substance and four years for the charges of criminal possession of a weapon. Additionally, Miller’s driver’s license would be suspended and he would have to forfeit $8,000, which was found in his house at the time of the arrest. Miller would also have to pay a fine of up to $2,500.

Part of the recommended sentences took into account that Miller is a predicate felon who was convicted of in 2010 of criminal sale of a controlled substance.

The plea also stated that Miller’s fiancee, who was living in the home, would not be prosecuted in connection with the crimes. She attended the sentencing with two  young children.

Miller accepted the guilty plea for the charges only four days before his bench trial, which was scheduled for Oct. 28.

The timing of the plea was a key element for presiding Judge John Rowley when determining whether or not to accept the deal reached between the prosecution and defense. Rowley said Miller had rejected a similar plea deal three weeks ago.

Rowley also expressed concerns that Miller was running an “enterprise” from his home.

Miller’s lawyer asked for the court to accept the plea, saying it was an “improved offer” from the one Miller recently rejected.

After a brief deliberation, Rowley agreed to accept the plea deal with the monetary fine tacked onto it, which he lowered from his initial desire to cap at $10,000.

Miller’s sentencing is set for Nov. 30 at 4:00 pm.