A fired Pinellas sheriff's deputy charged with shooting a handcuffed man during a 2015 traffic stop in Madeira Beach will spend no time in prison.

Timothy Virden, 62, pleaded guilty Tuesday to attempted manslaughter. He faced up to five years in prison.

Instead, he was sentenced to three years of probation.

The Pinellas-Pasco State Attorney's Office struck a plea deal with Virden that called for no prison time because there may have been just enough evidence to convince a jury to acquit the ex-deputy, said Executive Assistant State Attorney Kendall Davidson.

"We still felt that Deputy Virden's actions weren't justified," Davidson said.

PREVIOUS COVERAGE: Pinellas deputy arrested on attempted manslaughter charge

Virden may not even serve the full three years. He can apply for early termination halfway through his probation, court records show. Adjudication was also withheld, meaning he also avoided becoming a convicted felon.

The incident took place on Dec. 30, 2015. Deputies stopped a woman near John's Pass Village on suspicion of drunken driving. Her boyfriend, Dylan Tompkins-Holmes, told her not to comply with sobriety tests, the Sheriff's Office said at the time. Deputies told him to stop. When he didn't, Virden arrested Tompkins-Holmes on a charge of obstruction of justice.

As deputies walked him to the back of a sheriff's vehicle, the agency said, Tompkins-Holmes' pants dropped to the floor and he started cursing at the deputy as they placed him in the cruiser.

That's when the Sheriff's Office said Virden fired two shots into Tompkins-Holmes. He underwent surgery to remove part of his intestine and a bullet that was lodged in his spine.

After a monthlong investigation, Virden was fired and arrested. He was hired by the Sheriff's Office in 2007 and before that worked at the St. Petersburg Police Department for about 10 years.

His attorney, Joseph Ciarciaglino, said Wednesday his client faced a minimum of 19.5 months in prison if the case went to trial. So they made an offer to prosecutors: Virden would plead guilty in exchange for probation.

Despite pleading guilty, the attorney said Virden still maintains his innocence. That night, the ex-deputy said Tompkins-Holmes reached for his holster and grabbed his weapon.

"The guy told the truth from the beginning," Ciarciaglino said. "I knew he was telling the truth and I knew it was defendable based upon the truth."

Davidson said his office believes Virden is guilty, but concluded probation was appropriate after considering elements of the case that could sway a jury. First, Tompkins-Holmes' DNA was found on Virden's .45-caliber Glock pistol.

"We had to consider that as evidence that the jury would have to consider and evaluate," Davidson said.

Second, there were no other witnesses and Tompkins-Holmes has a poor recollection of the shooting. There was also only audio of the shooting after a dashcam failed to record video footage.

The plea deal comes a month after the conclusion of a civil suit filed by Tompkins-Holmes, now 28, in federal court that claimed Virden and the Sheriff's Office violated his civil rights.

In March, a judge dismissed the civil rights claim against the Sheriff's Office, but the agency was still on the hook for other claims, including negligence and battery. The Sheriff's Office settled with Tompkins-Holmes for $200,000, but did not admit fault.

"It was a decision made to resolve it in lieu of going to trial, although I'm confident we would have prevailed in trial," said Pinellas Sheriff Bob Gualtieri. "It was a business decision in a number of respects."

PREVIOUS COVERAGE: Man shot by former Pinellas Sheriff's deputy files lawsuit.

Last month, Tompkins-Holmes also settled with Virden. In their agreement, Tompkins-Holmes would not be able to collect damages against Virden, but could seek a $750,000 judgment in a special claims bill filed with the Legislature. Virden also did not admit liability, records show.

Tompkins-Holmes could not be reached for comment. His attorney, Wesley Straw, declined to discuss the case due to the settlement.

Contact Laura C. Morel at lmorel@tampabay.com. Follow @lauracmorel.