TULSA, Okla. -- A former Oklahoma volunteer sheriff's deputy who said he mistook his handgun for his stun gun when he fatally shot an unarmed suspect last year was sentenced Tuesday to four years in prison.

A judge gave Robert Bates, 74, the maximum penalty recommended by jurors who last month convicted the wealthy insurance executive of second-degree manslaughter.

Bates fatally shot Eric Harris while working with Tulsa County sheriff's deputies last year during an illegal gun sales sting. Harris, who had run from deputies, was restrained and unarmed when he was shot.

Get Breaking News Delivered to Your Inbox

Harris was black and Bates is white, but Harris' family has said they don't believe race played a role.

The shooting, which was captured on video, sparked several investigations. Among other things, the investigations revealed an internal memo questioning Bates' qualifications as a volunteer deputy and showed that Bates, a close friend of the sheriff's, had donated thousands of dollars in cash, vehicles and equipment to the sheriff's office.

Harris' family also testified at the sentencing hearing, CBS affiliate KOTV reported. His son's mother said she has forgiven Bates, but believes there are consequences for his actions and that four years in prison compared to losing a life is nothing.

After being sentenced, Bates was led away by deputies. His family members shouted, "We love you! We love you!" as he left court.

Judge Bill Musseman said handing down the prison sentence was a "legitimate and moral consequence" of Bates' actions. He said he took into account Bates' failing health and dozens of letters written by members of the community asking for leniency from the court.

Bates was given credit for the time he has served since being convicted. He must serve nine months of probation after his release.

Defense attorney Clark Brewster said they are planning an appeal.

"I'm confident we'll get a new audience through the appellate courts, and you'll be interviewing me about the reversal," Brewster told reporters after the sentencing.

Bates' defense attorneys argued at trial that methamphetamine found in Harris' system, along with his cardiac health, caused his death. Defense attorneys called the killing an "excusable homicide."

But prosecutors told jurors that Bates was guilty of culpable negligence when he shot Harris. One deputy testified that Bates apparently dozed off minutes before Harris fled from deputies.

Following the shooting, an outside consultant hired to review the sheriff's office determined that the agency suffered from a "system-wide failure of leadership and supervision" and had been in a "perceptible decline" for more than a decade. The reserve deputy program was later suspended.

Weeks after Harris was killed, an internal sheriff's office memo from 2009 was released by an attorney for Harris' family that alleged superiors knew Bates didn't have enough training but pressured others to look the other way because of his relationship with the sheriff and the agency.

A grand jury also investigated the agency and indicted the longtime sheriff, Stanley Glanz, in September, accusing him of failing to release the 2009 memo. He resigned on Nov. 1.

The new sheriff, who was sworn into office last month, has detailed plans to reform and revive the reserve deputy program.

Glanz was among dozens of people who wrote letters of support for Bates ahead of Tuesday's sentencing. Glanz wrote that he didn't believe his longtime friend was "a threat or a danger to anyone and should not be placed in an overcrowded state prison system."

"This is a terrible injustice for a man that made a terrible mistake in a split second," Glanz wrote in the letter submitted to the court.