After decades of fighting for justice, the five men wrongly convicted of brutally beating and raping a female jogger in Central Park in 1989 have agreed to settle their lawsuit against New York City for $40 million. 

The city agreed to the $40 million settlement Thursday to resolve the lengthy civil rights suit over the wrongful arrests and imprisonment of the then-teenage boys, The New York Times reported.

The boys, between 14 and 16 years old at the time, were convicted in 1990 and spent between five and 13 years in prison. They became infamous as the "Central Park Five."

At the time of the violent attack, dubbed the Central Park jogger case, the sensational story grabbed national headlines and became a symbol of the city's growing crime epidemic. The case raised questions about racial discrimination in the justice system as the city of New York and the media demanded that the five black or Hispanic defendants be prosecuted, despite the lack of evidence.

The victim, Trisha Meili, was a 28-year-old white investment banker who nearly died in the attack and has no memory of it. The suspects -- Antron McCray, Kevin Richardson, Raymond Santana, Korey Wise and Yusef Salaam -- were taken into custody and confessed after lengthy police interrogations. However, they all recanted their statements soon after, insisting they had confessed under the duress of exhaustion and coercion from police officers.

Years later, the actual culprit confessed. However, the men still spent years fighting to receive retribution, an apology and justice.  

An internal review by the Manhattan district attorney's office found that the boys' original confessions included "troubling discrepancies" and moved to throw out the convictions in 2002. A judge also vacated the convictions. However, by then, all five had been released from prison after serving between five and 13 years.

In 2003, they filed a suit against the city for wrongful conviction and violation of their civil rights, seeking $250 million in damages.

The settlement still most be approved by the city's comptroller and the federal judge in Manhattan, Deborah Batts, according to Al-Jazeera America.