For years, Mike Pence refused to pardon an innocent man. But one month after he left office as Indiana’s governor, his successor Eric Holcomb moved to clear Keith Cooper’s name.

Keith Cooper of Elkhart, Indiana, has maintained his innocence since he was charged with robbery and attempted murder in 1997. Tried and convicted in a single day, Cooper was sentenced to 40 years in prison for robbery resulting in serious injury. But while Cooper was behind bars, evidence of his innocence grew. The witnesses who testified against him recanted their statements. A DNA test implicated a different man. By 2014, Indiana’s parole board and the prosecutor who put Cooper away unanimously recommended Pence to issue a pardon. For years, Pence refused. It took Pence’s successor exactly one month to pardon him.

“It was a dream finally come true,” Cooper told The Daily Beast. When his family learned of the pardon, they were overcome with tears, he said. “They were just as overwhelmed as I was. We were excited because this was my biggest dream. They stood by me all this time.”

After years of fighting to clear Cooper’s name, news of the sudden pardon came as a surprise, even to his legal team.

“I was not given any kind of warning so I'm flying back to Chicago now,” Cooper’s lawyer Elliot Slosar told The Daily Beast from an airport on Thursday afternoon. Holcomb had announced Cooper’s pardon just hours before.

“After careful and thoughtful consideration and review, something I've thought about every day over the last month, just earlier today I issued a pardon to Mr. Keith Cooper for his past and I believe wrongful armed robbery felony [conviction],” Holcomb told press of the Thursday pardon. “I am very much at peace pardoning him for the one he claims innocence on… He has from the very outset and I believe he is innocent of that crime.”

Cooper has claimed innocence since the morning of Jan. 2, 1997. Cooper, then 29, had been out buying eggs, bacon, and cereal for his wife and three children. But while he carried home his groceries, four police cars pulled up alongside him. They had received reports of a tall, thin black man snatching a purse in the area. Cooper—tall, thin, and black—was put into a squad car at gunpoint.

Later, when Cooper was allowed to make contact with his wife, he told her not spend their money on bail. He was innocent, and expected to prove so quickly. In a sense, Cooper was right: Within a month, he was found not guilty of the purse theft. But while in jail, Cooper caught the attention of a police detective investigating a shooting from the previous year in Cooper’s apartment complex. Before he could be released from jail, he was charged with armed robbery and attempted murder.

With Cooper facing new, graver charges, his mother put up her house as collateral for his bond. He was tried and convicted in a single day, after witnesses claimed to recognize him as the man who broke into their home, demanded money, and shot a teenager in the hip. His jail cellmate testified against him, claiming Cooper had divulged information on the robbery, including information about a black hat that was found on the crime scene. The hat was tested for DNA evidence, and a lab report obtained by the Indianapolis Star concluded that Cooper “can be eliminated as a possible contributor,” but his lawyer made an agreement that effectively removed the DNA results as evidence. Cooper was sentenced to 40 years in prison.

Struggling for money, Cooper’s family moved out of the state, sometimes living in shelters. His three young children grew up out of sight. But a shred of hope remained in his appeals effort.

In 2002, an attorney ordered a second DNA test and it made clear that Cooper could not have worn the hat found on the crime scene. A third DNA test in 2004 tied the hat to Johlanis Ervin, who looked somewhat like Cooper and who was already incarcerated for a murder.

The conviction unraveled further from there.

The witnesses who testified against Cooper began recanting their statements. His cellmate wrote multiple affidavits claiming that police had coerced him into fabricating a statement against Cooper. The family of the teenager shot during the armed robbery backtracked on their testimony, claiming police had refused to show them a live lineup of suspects, and pressured them into identifying Cooper as the robber, even when they had doubts.

In 2005, the state offered him a deal: They would reduce Cooper’s sentence to the time he had already served and release him without overturning his conviction. The agreement let Cooper out of prison in April 2006, but kept the felony charge on his record.

Finally free, Cooper could see his family again. But the felony record still weighed heavy on him, making it difficult for him to advance in his career and making him wary of future interactions with police.

Slowly, with the support of the witnesses who had previously testified against him, and Slosar as his new attorney, Cooper began to build a case for a new trial. Meanwhile, state officials began building a case for a pardon. In 2014, the state’s parole board and Michael Christofeno, the prosecutor who tried Cooper’s case, unanimously recommended that Pence pardon Cooper, while over 100,000 people signed a petition calling for his pardon.

But Pence refused, saying Cooper would need to exhaust all his options in the court before Pence even considered granting a pardon.

“A pardon based on innocence requires a governor to substitute his judgment for that of the judicial branch,” Pence’s general counsel Mark Ahearn wrote in a letter denying the pardon.

Cooper’s legal team isn’t sure why Pence withheld the pardon, particularly as Cooper’s case drew national scrutiny when Pence joined Donald Trump’s presidential ticket. Slosar can only speculate, he said.

“I can’t speak for Gov. Pence and the decisions he made,” Slosar said. “What I can tell you is that I think Gov. Pence was trying to be savvy politically. He obviously at a point was angling to be the vice president. This pardon petition was squarely on his desk. It was something that was being covered extensively in the media. I imagine Gov. Pence knew that if he had granted this pardon while the election was going on that, politically, it wasn’t a palatable thing for him and the base of people he was trying to appeal to while on the ticket with Donald Trump.”

When Holcomb replaced Pence on Jan. 9, Slosar was gearing up for a long legal fight. Then, exactly one month into his term, Holcomb issued the surprise pardon.

“We literally had no idea. Up until today I was actually preparing for a forthcoming evidentiary hearing we were going to have in the Elkhart Circuit Court,” Slosar said on Thursday from the airport. “Gov. Holcomb did in four weeks what Gov. Pence did not do in four years.”

The pardon will allow Cooper to continue with the life disrupted 10 years ago.

“[The pardon] opens the door for me for promotions on my job,” Cooper said. “I don’t have to worry about if the police get behind me and run my plates. Now they’ll see that I’m a good guy, not a criminal.”

Cooper is also eligible to sue for wrongful conviction, which his co-defendant successfully did in 2014, after having his conviction overturned in 2006. The co-defendant, Christopher Parish settled with the City of Elkhart for $4.9 million. Cooper has not moved to file a wrongful conviction suit, although he would now be within his rights to do so, Elliot said.

Days after his pardon, Cooper said he was grateful for the people who had maintained his innocence, even while he was behind bars.

“It shows me unity: When people come together, our voices can be heard,” he said. “That’s something being done right.”