A Texas prosecutor will be jailed for his role in the wrongful conviction of Michael Morton, who spent 25 years in prison.

Ken Anderson will serve ten days in prison and perform 500 hours of community service. He will also be disbarred.

The former Williamson County district attorney was charged with tampering with and withholding evidence in the murder trial of Mr Morton in 1987. Mr Morton spent a quarter of a century in jail before he was exonerated over the murder of his wife by DNA evidence.

Mr Morton had been accused of beating his wife Christine to death in 1986.

Anderson, also a former district judge, entered a plea of no contest to contempt of court.

The charge stemmed from a 1987 exchange when Anderson, then the Williamson County district attorney, was asked by a judge whether he had anything to offer that was favourable to Mr Morton's defence, to which he replied no.

But Mr Morton’s lawyers alleged witness statements from Mr Morton’s then three-year-old son, who had seen the murder and said his father had not killed his mother, and statements from neighbours who told authorities they saw another man near the Morton home before the murder, were kept from them.

Mr Morton was finally freed in October 2011 when DNA evidence helped to over turn his conviction, tying the crime to another man.

Anderson, 61, never spoke in his return to the same court in Georgetown where he served as a state judge for 11 years before resigning in September.

He faced up to 10 years in prison if found guilty on the tampering charges, but prosecutors said statues of limitations made it a difficult conviction to pursue.

“It’s a good day” Mr Morton told reporters after the hearing. “I said the only thing that I want, as a baseline, is Ken Anderson to be off the bench and no longer practicing law — and both of those things have happened, and more.”

Anderson must hand himself into prison authorities by 2 December.

Judge Kelly Moore said the case against Anderson revealed a difficulty in determining justice.