The city spent more than $1 billion to settle claims and lawsuits in fiscal year 2017, with the biggest payouts going to “Black Sunday” firefighters and their families, men wrongfully convicted, and people hurt by cops.

The staggering sum — $1.018 billion — was a hair less than the $1.020 billion paid in FY 2016, City Comptroller Scott Stringer says in a report to be released Tuesday.

However, payments for personal-injury and property damage rose by nearly six percent — marking the fifth year in a row of rising costs.

On the positive side, Stringer touted a seven percent drop in the number of new “tort” claims filed.

“Fewer claims mean city agencies are working to improve their operations and this should reduce the costs of settlements and judgments down the road,” he said in a statement.

The city was socked with a $84.5 million tab to settle 11 cases of people jailed for crimes they didn’t commit.

The biggest wrongful-conviction payment, $26 million, went to Antonio Yarbough and Sharrif Wilson, who spent 21 years in prison for a 1992 triple murder. Both were freed in 2014 after new DNA evidence cleared them.

Another $20.4 million paid for unjust convictions after a 1980 Park Slope arson and murder. Two men who spent 32 years behind bars and the family of a third who died in prison got the settlements.

Other top payouts include:

$29.5 million for the families of two firefighters who died and three critically injured when they jumped from a blazing apartment on the fifth floor of a Bronx building on Jan. 23, 2005 — dubbed “Black Sunday.” They sued the city for failing to provide ropes, which would have enabled the trapped men to safely escape. A Bronx jury awarded the five $183 million, but the city appealed, prompting the settlements. All firefighters received “personal safety systems” after the tragedy, said FDNY spokesman Jim Dwyer.

$6.9 million for Joseph Felice, shot six times in 2014 by a drunk, off-duty NYPD officer, Brendan Cronin, who recklessly fired his service revolver into Felice’s car while stopped at a red light in New Rochelle.

$5.8 million for the death of Bradley Ballard, a mentally ill and diabetic Rikers inmate, found naked in his cell without medication or water.

Payments for claims such as false arrest and excessive force rose by 10 percent to $308 million. But new claims against the NYPD dropped by 14 percent, a third consecutive annual decline.

“Cops are listening,” a staffer said. Stringer tracks claims against the NYPD, Corrections and other departments to look for patterns of misconduct and mistakes so that brass can nip problems in the bud.