Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

New York City has agreed to pay $6.25 million to a man who spent nearly 25 years in prison before being exonerated in a killing that happened while he was more than 1,000 miles away vacationing at Disney World, the city comptroller said Tuesday.

Comptroller Scott Stringer said settling Jonathan Fleming's claim is "in the best interest of all parties."

"We cannot give back the time that he served, but the city of New York can offer Jonathan Fleming this compensation for the injustice that was committed against him," Stringer said.

Jonathan Fleming, center, talks with reporters after exiting a courtroom in New York, on April 8. Fleming, who spent almost a quarter-century behind bars for murder, was freed on Tuesday and cleared of a killing that happened when he was 1,100 miles away on a Disney World vacation. Seth Wenig / AP

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Fleming was released last year after the Brooklyn district attorney's office said it had come to agree that his alibi — which he offered from the start — was valid.

His lawyers praised the city for moving expeditiously to settle with Fleming, who filed notice last year that he planned to sue for $162 million.

"The swift settlement will enable Jonathan and his family to build a new life without the painful and costly prospect of further litigation," attorneys Paul Callan and Martin Edelman said.

Related: Not Guilty After All: Texas and New York Push Exonerations to New High

But they noted that the relief was streaked with sadness: Shortly after signing the settlement documents, Fleming, 53, went to a hospital where his mother is near death.

Her only son was behind bars for nearly half his life, convicted of shooting a friend in Brooklyn in August 1989, though he had told authorities he was more than 1,000 miles away at the time and had plane tickets, videos and other material to show it. A woman testified that she had seen him commit the crime.

Related: Fernando Bermudez and Other Wrongly Convicted Fight for Compensation

But then that eyewitness recanted, newly found witnesses implicated someone else and prosecutors' review of authorities' files turned up documents backing Fleming's alibi. That evidence included a hotel receipt that he paid in Orlando, Florida, about five hours before the shooting and had in his pocket when arrested.

Authorities had never given his defense that receipt or a 1989 Orlando police letter telling New York detectives that some employees at the hotel remembered Fleming.