New York City will pay $2.5 million to settle a lawsuit from a man wrongfully convicted of murder, the Daily News has learned.

Joel Fowler spent eight years locked up for a 2007 murder in Brooklyn. The ex-Crips member was accused of killing Bloods rival Dwayne Smith but prosecutors under the watch of late Brooklyn DA Ken Thompson concluded in 2015 that Fowler had nothing to do with the Flatbush shooting.

On Monday, lawyers for Fowler and the city filed papers in Brooklyn Federal Court bringing the 27-year-old man’s lawsuit to a close. Fowler was arrested at age 17.

A year after he was cleared and released from prison, Fowler sued the city and three NYPD detectives, saying witnesses were forced into fingering him with the crime.

“The settlement, while substantial, doesn’t come close to making up for the eight years of his life our client lost,” said attorney Joel Rudin, who, with Earl Ward, represented Fowler. “When his conviction was overturned, he was dumped into the community with no support whatsoever. At least now he can get on with his life.”

A rep for the city’s Law Department said, “Settling was in the best interest of all parties.”

The settlement is the latest in a string of wrongful conviction settlements stemming from Brooklyn cases.

Last month, the city said it would pay Andre Hatchett $12.25 million for spending 25 years behind bars on a rotten murder rap over a 1991 killing. And earlier this year, the city agreed to pay $26 million for two men who spent more than 20 years incarcerated on a triple homicide they didn’t commit.