NEW YORK (CBSNewYork) —  Men outside of Bellevue Hospital recited the words of Psalm 20 ‘may the lord answer you on the day of distress,’ as they prayed for the full recovery of stabbing victim Levi Rosenblatt on Tuesday night.

A man wielding a knife who stabbed Rosenblatt, an Israeli student, inside a Brooklyn synagogue was fatally shot by police early Tuesday morning when he refused to drop the knife, police said.

It happened around 1:40 a.m. at the Chabad-Lubavitch Hasidic world headquarters in Crown Heights. Part of the incident was caught on cellphone video.

LINK: (Warning Graphic Content) Watch The Full Video

Police identified Calvin Peters, 49, as the man who stabbed the 22-year-old Rosenblatt.

Rosenblatt had been studying inside the synagogue when he was attacked, Motti Seligson said.

“I see his whole side of his face all stabbed up and bloody,” one witness told 1010 WINS’ Roger Stern. “He was screaming for help, and I told him to calm down.”

Police responded to the scene after a witness flagged down a patrol officer.

As CBS2’s Tony Aiello reported, Officer Timothy Donohue was the first one on the scene.

In video of the incident posted online, Peters can be seen holding a knife in his right hand while surrounded by bystanders and officers with weapons drawn.

Peters can be seen yelling at bystanders, asking one man in the video, “Want me to kill you?”

An officer is heard telling him repeatedly to drop the knife and step away. Others in the room appear to be trying to calm Peters down, telling him to put down the knife.

He eventually puts it on a table and backs away and one of the officers is seen holstering his weapon.

But moments later, Peters is seen grabbing the knife off the table and starts to walk around the room as officers yell at him repeatedly to drop the knife.

“The policeman, he tell you ‘stop, stop’ but guy is not stopping,” witness Rafael Benloulou, who recorded most of the incident on video, told CBS2’s Dave Carlin.

That’s when police said he lunged at one of the officers, who fired once, hitting him in the torso. A gunshot is heard on the video as officers continue yelling for him to drop the knife.

Video shows Peters lying on the ground alive as officers put him in handcuffs. He was taken to a hospital, where he was pronounced dead.

Rosenblatt, who was stabbed in the left temple, was taken to the hospital in stable condition, police said.

CBS2 was told his family members live in Israel and are traveling to be at his side in Crown Heights.

Levi Rosenblatt (credit: Chabad)

Levi Rosenblatt (credit: Chabad)

Assemblyman Dov Hikind condemned the attack, calling it a “despicable act.”

“I’m told that the attacker came earlier that evening, too. He was stalking the scene,” Hikind said in a statement. “Thank God he didn’t inflict more harm nor do more damage to more people.”

Councilman David Greenfield called it a “vicious and shocking attack.”

“The video clearly shows that everyone, including friends of the victims, tried to de-escalate the situation of an armed man inside shul who had just stabbed a Jewish student,” he said in a statement. “The attacker was yelling ‘do you want me to kill you?’ at shul-goers and NYPD officers at the scene. The responding officers bravely shot the perpetrator and protected the lives of others in the synagogue.”

Mayor Bill de Blasio said authorities are “monitoring this case very closely and conducting a thorough investigation” and commended the responding officers.

“They responded quickly to a tense and dangerous situation and while any loss of life is tragic, we are fortunate that, thanks to the actions of our officers early this morning, more people were not injured or worse,” the mayor said in a statement. “The job our brave men and women perform on a daily basis to protect the people of New York City is often perilous and difficult and we thank them for their service.”

He also said “Our thoughts and prayers go out to the family of Levi Rosenblatt and the entire Chabad-Lubavitch community.”

Police Commissioner Bill Bratton called Officer Roberto Pagan’s actions justified.

“The actions of the officers are more than justified based on the dangers that they and seven other individuals faced in the basement of that building,” Bratton said.

Brooklyn Borough President Eric Adams, a former police officer, said it’s clear the shooting was justifiable.

“As the city is really wrestling with the national issue, we wanted to immediately come out and show our support,” he said.

Police said Peters, from Valley Stream, had a history of mental illness and had been arrested 19 times since 1982, most recently in 2006 for drugs.

“Has a history of being an emotionally disturbed person and acting out in other places,” said John Miller, NYPD deputy commissioner of intelligence and counter terrorism.

Synagogue member Shimon Liberow said he saw the same man Monday night and pegged him as an obvious outsider.

“He said, ‘Oh there are prayers, could I pray?’ he asked,” said Liberow. “They said you have to be Jewish and he said ‘how do I do that?'”

Seligson said witnesses reported the suspect repeatedly saying, “Kill the Jews.” But Brooklyn Chief of Detectives Pat Conry said Peters may have said something along the lines of, “I will kill all of you.”

Bratton said police are investigating the alleged remarks.

“That’s part of the investigation, it’s been alleged there was that statement,” Bratton said. “We have a number of witnesses and my understanding is that one of the witnesses, in his statement, said he heard that. We will seek to corroborate that as part of the investigation.”

Police said a 9-inch knife with a 4 1/2-inch blade was recovered at the scene. Three officers were also hospitalized for ringing in the ear.

Knife Used In Synagogue Stabbing (NYPD)

Knife Used In Synagogue Stabbing (NYPD)

“While we are very pained by everything that has unfolded, we are very grateful to the police for their quick response and are working closely with the authorities in their ongoing investigation,” said Seligson. “We commend the heroic efforts of the individuals who were present and took immediate action. If not for their intervention the outcome could have been, God forbid far worse.”

Police said this appears to be an isolated incident, but given the nature of what happened and a recent attack inside a synagogue in Jerusalem, security has been beefed up around religious institutions.

“As a note of caution, as we always do, we have used our critical response vehicles. We assign them to various Jewish facilities around the city,” Bratton told WCBS 880’s Rich Lamb. “But at this time, the preliminary investigation is giving us no indication that the subject, who is now deceased, had any affiliation with any terrorist organization.”

The basement room where the incident took place has since been cleaned and reopened.

“People are very shocked and saddened,” Seligson said. “They’re praying. They’re praying for peace and harmony in this city and they’re praying for the well-being of Levi.”

One woman who was praying for the victim inside the synagogue said she feels violated.

“I think there’s a feeling of people can do whatever they want,” she told WCBS 880’s Marla Diamond. “I really do. People can do what they want and everything goes.”

Attorney Jeffrey St. Clair said Peters’ family was shocked by the incident. He said Peters had a history of bi-polar disorder, but said there were no indications that he would do anything harmful.

“Calvin Peters was a loving and devoted father,” he told the Associated Press. “And the family is quite frankly shocked and disappointed at what happened. Our prayers go out to the person that was injured. But we really ask that you respect our privacy and allow them to grieve.”

The investigation is ongoing.

Check Out These Other Stories From CBSNewYork.com: