NEW YORK (AP) — John Keenan, the police officer who led New York City’s manhunt for the infamous “Son of Sam” killer and eventually took a case-solving confession from David Berkowitz, has died.

His death Thursday at age 99 was announced by the NYPD and Keenan’s family. He had been in declining health in the past two months and died of heart failure, said his grandson, Kevin Brennan.

Keenan was the NYPD’s Chief of Detectives during the killings, which terrified the city in 1976 and 1977 as an unknown gunman stalked his victims with a .44-caliber handgun, killing six, and wounding seven others.

When a parking ticket, issued to a car seen parked near the scene of one slaying, finally led detectives on Aug. 10, 1977, to the Yonkers home of Berkowitz, a 24-year-old postal worker, Keenan was there to confront him.

It was a climactic scene Keenan later recounted many times for journalists.

“I know you. You’re Detective — Chief Keenan,” said Berkowitz, who had publicly taunted the police with notes during the hunt.

“Who are you?” Keenan asked.

“I am the Son of Sam,” Berkowitz replied.

Keenan’s work on the case came near the end of a 37-year career with New York’s Finest. He announced his retirement five months later when a new commissioner took office and wanted to appoint his own top deputies.

During World War II, Keenan was a lieutenant in the Army’s Counter Intelligence Corps. He landed on Utah Beach in the D-Day invasion and participated in the Battle of the Bulge and the liberation of Paris.

Author J.D. Salinger, who was writing “Catcher in the Rye” between battles, was in Keenan’s infantry division and became a lifelong friend.

After leaving the NYPD, Keenan became vice president for operations at the New York Racing Association, which operates the Belmont Park, Aqueduct, and Saratoga thoroughbred horse tracks.

Keenan and his wife, Sara, were married for 73 years. They had met during the war at an Army headquarters where she was working on New York’s Governors Island and wed soon after he returned from overseas, Brennan said. Two of their three daughters preceded him in death.

Sara and their surviving daughter were at Keenan’s bedside at a hospital near their Rockville Centre, Long Island, home when he died, Brennan said. Years earlier, Keenan had beaten lung cancer, his grandson said. He would have turned 100 in December.

“Truly saddened to learn that former Chief of Detectives John Keenan has passed,” the current chief of detectives, Dermot Shea, tweeted Friday. “A life of epic heroism, he stormed Normandy on D-Day, fought in the Battle of the Bulge & later, as the NYPD Chief of D’s, took the confession from the Son of Sam. We salute you, sir. #FidelisAdMortem.”

Keenan’s leadership of the Son of Sam manhunt cemented his reputation as a tough but tactical policeman.

Around the same time, he made headlines for being the first NYPD commander to assign women to the homicide investigation squad — a move he told reporters at the time was “more than just a trend of women’s lib.”

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)