An inmate mistakenly released from a Washington state prison three months early has been charged with killing a teenager when the inmate should have been locked up, officials said Thursday.

It was the second death tied to the early release of as many as 3,200 prisoners since 2002 because of a software coding error that miscalculated sentences.

There are likely to be more crimes linked to inmates freed too soon, Department of Corrections Secretary Dan Pacholke said.

"I'm very concerned about what we'll uncover as we move forward," he said during a conference call with reporters. "It concerns me deeply about just the tragedy that is being produced based on early release."

Jeremiah Smith, 26, was wrongly released on May 14. Less than two weeks later, he gunned down Ceasar Medina, 17, at a tattoo parlor in Spokane, authorities said.

Smith, who had been convicted of robbery, burglary and assault, shouldn't have been released until Aug. 10, authorities say.

He was arrested shortly after the May 26 killing and charged with first-degree murder, burglary and other charges. He remains in custody while awaiting trial.

Two other men have been charged with crimes that occurred when they should have been behind bars. Robert Jackson was charged with vehicular homicide in the death of his girlfriend in a car crash, while Daniel Morris was charged with attempting to elude authorities.

Pacholke said he and Gov. Jay Inslee have apologized and offered condolences to Medina's mother and the family of the woman killed.

Tracy Collins, the attorney for Smith, said Thursday he worried the publicity about the early release of prisoners would affect his client's ability to get a fair trial.

"We have to keep in mind that he's innocent of this charge until proven guilty," Collins said.

Officials announced last week that as many as 3,200 prisoners had been mistakenly released since 2002 because of problems calculating sentences. So far, more than two dozen offenders who need to serve additional time are back in custody, and the Department of Corrections is reviewing additional releases.

"I'm very confident that we'll get to the bottom of it," Pacholke said.

The attorney general's office advised the Department of Corrections in 2012 that it wasn't necessary to manually recalculate prisoners' sentences after the software error was brought to light, according to documents released by the department late Wednesday.

The assistant attorney general assigned to the agency wrote in December 2012 that from a risk management perspective, a recalculation by hand of hundreds of sentences was "not so urgent" because a software reprogramming fix would eventually take care of the issue, according to the emails released in response to a public records request by The Associated Press.

Corrections officials acknowledged this week that the software fix was delayed 16 times and ultimately never done. A fix is expected early next month, and corrections officials say they are doing manual recalculations for prisoners whose sentences may have been affected.

The agency was alerted to the error in December 2012, when a victim's family learned of a prisoner's imminent release. The family did its own calculations and found that the prisoner was being credited with too much time for good behavior.

The mistake followed a 2002 state Supreme Court ruling requiring the Department of Corrections to apply good-behavior credits earned in county jail to state prison sentences. But the programming fix ended up giving prisoners with sentencing enhancements too much "good time credit."

Sentencing enhancements include additional prison time given for certain crimes, such as those involving firearms. Under state law, prisoners who get extra time for sentencing enhancements cannot have it reduced for good behavior.