A Cobb County judge has sentenced a Gainesville man to 40 years for trafficking cocaine and related charges, District Attorney Vic Reynolds said Wednesday.

Cobb police arrested Maxime Patrick Bien Aime, 36, during a traffic stop in May 2014. They found 36 grams of crack cocaine and 9 grams of powder cocaine — about an ounce and a half total — in his pockets when they searched him, Reynolds said in an email. Aime, a felon, also had a firearm.

Aime also possessed a scale, a marijuana cigarette and $3,500 in cash, the prosecutor said. He admitted owning the cocaine and marijuana when he testified but insisted they were for personal use, not for trafficking, Reynolds said.

Aimee had a previous arrest for drug trafficking that had been reduced to possession with intent to sell in a plea bargain, said his lawyer John Allen Hildebrand. The movement in Georgia and nationally has been to shorter sentences in non-violent drug cases. The Justice Department this week announced the release of 6,000 drug offenders from federal prison.

Trafficking cases, however, still result in serious time, Hildebrand said.

“Realistically, I didn’t think the judge was that hard on him,” said Hildebrand, noting the legal minimum was 10 years to serve.“When you have a repeat drug offender and you get a conviction like that, they tend to lay the hammer down.”

On Tuesday, Superior Court Judge Reuben M. Green sentenced Aime to 40 years, with 20 years to serve in prison and the remainder on probation. A $200,000 fine also was imposed.

“I believe the sentence imposed by Judge Green sends a message that if you are convicted in Cobb County of peddling this poison, you will be reflecting on your actions from the inside of a prison cell for a long time,” said prosecutor Shep Orlow, who handled the case at trial.