A man who spent 17 years in prison after being wrongfully convicted of a robbery committed by someone who looks just like him will receive more than $1 million, officials announced Tuesday.

Kansas Attorney General Derek Schmidt said Richard Anthony Jones, 42, was the first person to receive a settlement under a new state law that provides compensation to people who are wrongly imprisoned.

In 2000, Jones was convicted in Johnson County, Kansas and imprisoned for an aggravated robbery he did not commit. His conviction was vacated and charges against him dismissed in 2017.

The settlement came as part of an agreement after Jones filed a lawsuit in August seeking compensation for the state's mistake.

CLICK HERE TO GET THE FOX NEWS APP

"We are committed to faithfully administering the new mistaken-conviction statute the legislature enacted,” Schmidt said. “In this case, it was possible on the existing record to resolve all issues quickly, satisfy all of the statute’s requirements, and agree to this outcome so Mr. Jones can receive the benefits to which he is entitled by law because he was mistakenly convicted.”

Eyewitness testimony sent Jones to prison for an attack and robbery in the parking lot of a Walmart in Roeland Park, Kansas in 1999 but no physical evidence linked Jones to the crime, and he always maintained his innocence.

He was freed after supporters found evidence that another man who looked just like him lived near the Walmart.

After the victim and witnesses withdrew their identification of Jones, Johnson County District Judge Kevin Moriarty ordered his. While not saying the other man committed the crime, Moriarty found that based on the new evidence, no reasonable juror would have convicted Jones. The other man, known as Rick Amos, testified at the hearing that he did not commit the robbery.

Amos had been in and out of prison in the 1990s, and the two were in the same facility at one time, the Washington Post previously reported.

'THE GIRL IN THE CLOSET' ARRESTED IN SEXUAL ASSAULT OF 14-YEAR-OLD GIRL, POLICE SAY

"We are absolutely very happy by the result," said Tricia Bushnell, the executive director of the Midwest Innocence Project, which helped represent Jones. "This is why we've all worked so hard to get compensation in the state of Kansas. This will allow Richard to start to rebuild his life after the years that were taken, and that means a lot."

Under the settlement, Jones was granted a certificate of innocence and will receive counseling and health care through the state for two years. The settlement requires final approval by a state council.

The Associated Press contributed to this report.