Police shot and killed a gunman in Morningside Heights outside the Cathedral Church of St. John the Divine on Sunday afternoon.

The unidentified man opened fire at West 112th Street and Amsterdam Avenue shortly before 4 p.m. just after a holiday carols concert on the steps of the church had ended, according to NYPD Commissioner Dermot Shea and witnesses.

Witnesses told detectives the man had yelled out "kill me" during the incident, Shea told reporters during a press briefing on Sunday. A police officer, detective, and sergeant quickly responded, firing 15 shots at the gunman, who also fired multiple shots, Shea said.

The man was struck in the head and taken to a nearby hospital with life-threatening conditions. He later died, police spokespersons said.

People on the steps of the church hold their hands up as police investigate the shooting.

No police officers were injured.

The FDNY says two people were taken to Mount Sinai Morningside Hospital, formerly known as St. Luke's Hospital, but it is not clear who the second person was and what their condition is. Shea indicated Sunday no one else was shot.

The cathedral had just finished the outdoor concert when the shots rang out, according to a witness.

"I was with my friend going up the stairs of the cathedral," said Jessica Mates, who had attended the concert and is the chief of staff for the Manhattan Borough President Gale Brewer. "And we heard a shot, a gunshot."

People began running towards the doors and took shelter inside, where they were held for about an hour or so before they were permitted to leave about 5:20 p.m., according to Mates, who, along with Brewer's press secretary, was safe after the incident. Police on the scene told Mates and others inside the church that the shooting appeared to have been a suicide-by-cop scenario.

"What they told us is that he was shooting up in the air and saying to the cops just to, 'Come shoot me, come shoot me.'" Mates said. "It was scary. But everyone, thank God, is okay."

The man did not appear to be a part of the caroling event.

Father Patrick Malloy said, at first, he thought the gunshots may have just been "city noise."

"But then when people ran toward us and said there were shots, then the number of shots picked up, and they became very, very fast. Lots of shots very fast. Then we knew people were not imagining things," said Malloy, who was speaking with congregants near the cathedral's famous peacocks when he first heard the gunfire. "They were just looking to get away."

City Councilmember Mark Levine, who represents the area, said someone who appeared to be mentally ill had climbed the scaffolding at the church and shot "indiscriminately" into the air.

"He was yelling that he wanted to be killed. Police arrived quickly. The suspect was shot," Levine wrote on Twitter.

Shea did not confirm where the gunman had fired his gun, saying video footage was still being reviewed and witnesses' information reviewed.

Two semi-automatic guns were recovered, as well as a bag with gasoline, rope, wire, multiple knives, a Bible, and tape, the commissioner said.

"I can tell you that from the preliminary body camera—and again this is quick—that we watched, you see three officers acting heroically—sergeant, detective, and police officer," Shea said. "Engaging an armed perpetrator, putting themselves in harm's way to pull people that are literally hiding behind these poles behind me, caught in the crossfire."

The NYPD will release body camera footage within 30 days under a protocol put into place this summer following mass protests against police misconduct.

This story has been updated, with additional reporting by George Joseph.