At a candlelight vigil outside City Hall for the nine NYPD officers who have committed suicide this year, seasoned cops spoke of the last time a suicide epidemic struck the force.

It was 1994, and a record 12 NYPD officers died at their own hand.

No one pretends to understand the reasons for what NYPD Chief of Department Terence Monahan now calls a “contagion,” in which New York’s cops commit suicide at two to three times the rate of the general citizenry. Marriage breakdowns, financial stress and easy access to guns are factors in individual cases, so you can’t blame the stress of police work entirely.

But that didn’t stop theories being thrown around Monday night to explain why the joy has left the job.

Some cite the new disrespect on the street for law enforcement. Others note a wave of lenient new laws in the pipeline from progressive New York state lawmakers.

Many see warning signs that the pendulum on crime is swinging back to the bad old days of the 1980s and 1990s.

One detective who joined in 1983 and saw the worst of the crack epidemic, until crime rates plunge under Mayor Rudy Guiliani’s “Broken Windows” brand of aggressive policing of street offenses and signs of disorder, said he is watching the city go “full circle.”

That has an effect on morale of police, who feel powerless as perps gain the upper hand.

“People take this job to help people and if it’s not appreciated it can have a long-term effect on people,” he said.

In his first few years on the job, crime rates were high but there wasn’t the “total disrespect for law and order we have today,” he said.

“Now we don’t have the backing of the politicians. Right this second I have a funny feeling we’re repeating history . . .

“If someone throws water on a cop, that’s an attack on society. If he can do that to a cop, what will he do to you?”

Now, as cops are taunted and doused with buckets of water and more recently, a half-gallon of milk, they feel powerless. A sense of dread is returning to streets that have been calm for more than two decades.

The so-called “Pantaleo effect” is just one manifestation, with police on a go-slow since the NYPD, under pressure from Mayor Bill De Blasio, fired Officer Daniel Pantaleo last month over his role in the fatal arrest of Staten Island cigarette seller Eric Garner in 2014 and the racial unrest it sparked.

Police Benevolent Association boss Patrick J. Lynch accuses the mayor of creating a “cop-hating” environment as arrest rates plummet for the sort of quality-of-life offenses that underpinned Broken Windows policing.

Shootings are up. There’s open drug dealing in parks. The filthy subway has been turned over to the homeless. Turnstile-hopping, panhandling, drug-dealing and harassment go unpunished.

Who could blame cops for making the pragmatic decision that, if they are to be punished for making arrests, it’s better to walk away?

But, still, it eats away at them. The prestige of the job is fading.

Adding to their sense of being unappreciated and undervalued is the fact that New York’s Finest are worse paid than cops in comparable jurisdictions.

The basic maximum salary this year of an NYPD police officer is $85,292, according to the PBA, about 20% less than the salary of a Metropolitan Transportation Authority police officer, who earns $100,368, or state troopers, who get $103,159.

It’s a whopping 63% less than a Suffolk Country police officer’s pay of $139,233.

The PBA says NYPD cops would need a 34% raise to rival the average pay of $114,126 in comparable jurisdictions.

It rankles cops, working alongside state troopers or Port Authority officers, knowing they’re being paid less for riskier work.

None of this is an accident.

Mayor de Blasio has no interest in improving the lot of police in his city. He ran on a platform of ending “aggressive” law enforcement and has done his best to undermine proactive policing, singing from the left-wing song sheet, which claims that the criminal justice system is racist.

And, yet, the police force he oversees is majority nonwhite. As of Dec. 31 last year, 30% of NYPD officers were Hispanic, 16% were black and 9% were Asian.

It doesn’t matter what the race of a police officer, denigration and disrespect of the uniform is an equal-opportunity offender.

Cops of all backgrounds are now bracing themselves for the job to become even tougher as a suite of progressive criminal justice reforms come into force on Jan. 1.

The new laws, which passed the state Legislature in April, aim to keep people out of jail.

They eliminate cash bail for most nonviolent crimes, including theft and burglary. They apply lenient penalties for drug crimes. They limit the release of mug shots and generally make life easier for criminals, all against the wishes of the state’s prosecutors and police.

Perhaps the most egregious reform, which is a slap in the face to victims, is of New York’s “discovery law,” which means the names and contact information of victims must now be released to defense lawyers and crime scenes made available.

The revolving door of crime is coming back and cops can only look on helplessly.

They are good people who signed up to keep law-abiding New Yorkers safe. Now New York is telling them to sit on their hands.

It doesn’t explain everything about plummeting morale in the NYPD, but it says something.

How 9/11 resurged America’s patriotism

Looking back on the 18th anniversary of the terrorist attacks of Sept. 11, 2001, it seemed almost innocent to recall the shock the world felt at the time.

I can’t forget the acrid smell of the fires still burning deep within the rubble as I walked down Seventh Avenue toward ground zero a few days after the attack. Past West 11th Street, the fine dust left a chemical aftertaste on the tip of your tongue.

“We’re not being told how toxic it is,” people said knowingly, while not wearing the gauze masks tucked into a pocket.

I can’t forget the fences and phone boxes and shopfronts papered over with the smiling faces of the missing.

At Union Square, there was a makeshift shrine around a shoebox in the middle of the park. Inside the box was an old pair of men’s black leather lace-ups and a firefighter’s small torch. On the lid was written, “I looked for you my baby brother. I love you, Mathew Diaz.”

New Yorkers sat around the park past midnight that week, arguing passionately, but courteously, about how America should respond to the terrorist attack that had targeted their city and killed 3,000 of their own. Were we victims or villains?

That argument has only sharpened and grown more poisonous in the years since. Do you drop bombs or bread, was the gist. Do you appease the Islamists and accept their anti-American critique, or do you strike back? In the end, the US and its allies tried both. Invading Iraq was a show of strength, but also aimed to establish a beacon of democracy, naively, as it turned out.

On the eve of the 18th anniversary, there was a macabre symmetry to President Trump’s firing of John Bolton, one of the original neo-con Iraq hawks.

Misadventures in the Middle East sent US power and prestige into decline. But they also sowed the seeds for Trump’s victory, amid a resurgence of American patriotism and self-reliance.

Despite elite self-flagellating, America still believes in itself. That’s the lesson of 9/11.