BANGOR, Maine — A Thomaston man was sentenced Thursday in U.S. District Court to five years and three months in federal prison for having 2,400 doses of bath salts with an estimated street value of $170,000 hidden in his apartment and car.

Travis Griffin, 27, also was sentenced to three years of supervised release after he completes his prison term.

Griffin waived indictment and pleaded guilty in April to possession with intent to distribute controlled substances. He has been held without bail since his arrest in November following a traffic stop.

“This is a horrific amount of bath salts,” U.S. District Judge John Woodcock told Griffin shortly before imposing the sentence. “Had it been distributed, it would have caused untold sorrow and mischief in the state of Maine.”

Griffin was distributing the drug, which can cause users to hallucinate and become violent, for most of 2011 in Penobscot and Knox counties, according to the prosecution version of events to which he pleaded guilty.

“I apologize to anybody my actions may have affected,” Griffin told the judge. “I see now that drugs were a big part of my life and I’ve just got to make the best of the situation I’m in now.”

Griffin, who dropped out of school in the 10th grade, started using drugs when he was 15, Woodcock said, referring to information gathered by U.S. Probation and Pretrial Services. In the past 12 years, Griffin has been convicted of 10 crimes in state court.

He faced up to 20 years in prison and a fine of up to $250,000 on the federal drug charge. Assistant U.S. Attorney Joel Casey recommended the sentence Woodcock imposed. Defense attorney Wayne Foote of Bangor urged Woodcock to impose less than five years.

As a condition of his supervised release, the judge ordered Griffin to undergo treatment for substance abuse and to pay the more than $30,000 he owes in child support.