PROVIDENCE, R.I. (AP) — A bill that would compensate people who have served prison time for crimes they did not commit is advancing in Rhode Island's legislature.

The legislation passed the House Judiciary Committee on Wednesday.

It was inspired by the case of a former Warwick police officer who was wrongfully convicted of murder in the 1989 killing of a Warwick woman with whom he was having an affair. He served more than six years in prison before the victim's ex-boyfriend confessed.

The measure approved unanimously would provide $50,000 out of the state treasury for each year spent in prison to "innocent persons who have been wrongfully convicted of crimes."

The bill's sponsor, West Warwick Democratic Rep. Patricia Serpa, says Rhode Island is one of 17 states that does not compensate the wrongly convicted.