BANGOR, Maine — A local man is facing perjury charges after he was convicted Friday by a Penobscot County jury on drug charges.

Daniel Fox, 29, of Bangor was charged with lying when he took the stand last month in his first trial, which ended in a mistrial, and again when he took the stand Thursday at the Penobscot Judicial Center.

Fox was arrested by Bangor police on Feb. 11, 2015, according to Alice Clifford, deputy district attorney for Penobscot County, who prosecuted the case.

“He was found slumped over the wheel of his car, which was running, with 99 packets of heroin in his car and $543 strewn all over his lap and into the passenger seat,” she said after the jury announced its verdict.

Fox was indicted in May 2015 for unlawful trafficking of scheduled drugs, unlawful possession of scheduled drugs, criminal forfeiture of U.S. currency and operating after suspension.

A jury found him guilty last month of the driving charge but was unable to reach a verdict on the other charges.

The retrial began Thursday and the jury deliberated Friday for about 90 minutes before finding him guilty on the Class B drug charges, Clifford said.

Superior Court Justice Ann Murray sentenced Fox to 4½ years in prison with all but 2½ years suspended after she dismissed the jury. The judge ordered that Fox be on probation for two years, pay $800 in fines and forfeit the cash that was seized when he was arrested.

He faced up to 10 years in prison and fines of up to $20,000.

Fox was informed after his sentencing of the new charges but was not asked to enter pleas because his has not yet been indicted on the Class C perjury charges.

His alleged false testimony was uncovered after the first trial when Fox took the stand and told jurors the cash he had when arrested was a cashed paycheck, Clifford said Friday.

“He told jurors the same thing on Thursday,” she said.

Garry Higgins, the investigator in the Penobscot County district attorney’s office, found that Fox stopped working for a telemarketing firm in Orono nearly a month before he was arrested.

Fox is next due in court on June 8.