Authorities are stepping up security at the headquarters of an international Jewish organization in Brooklyn after a mentally ill man wandered inside the library and stabbed a student in the head before he was shot and killed by police.

Calvin Peters, 49, was seen on amateur video waving a knife in the Chabad-Lubavitch headquarters in Crown Heights at 1:40 a.m. Tuesday after the attack on Levi Rosenblat. The 22-year-old, wounded on the side of the head, was listed in stable condition.

New York City police said the stabbing was not believed to be connected to terrorism. But it shook the Jewish community, still reeling over an attack on a Jerusalem synagogue by two Palestinian cousins last month that left four worshippers and an officer dead.

Police Commissioner William Bratton said the department was already on heightened alert based on the incidents in Israel. His deputy commissioner for intelligence and counterterrorism, John Miller, said there was an increased presence at religious locations.

"Given frankly the concern that the news of this story may bring to houses of worship around the city, our critical incident response vehicles which we normally post at sensitive locations depending on what the threat stream of the day is will focus on religious institutions in part," Miller said.

New York state Assemblyman Dov Hikind, whose Brooklyn constituents are largely Orthodox Jews, said the entire Jewish community was impacted by the attack, and said synagogues may want to start taking stronger security precautions.

"Maybe it is time for synagogues ... to figure out, if someone walks in with a knife, how do you defend yourself?"

Chabad-Lubavitch officials said security was tightened, but didn't elaborate, and wouldn't say what measures were in place at the time of the attack.

Peters had wandered into the building earlier Monday and was ushered out, then returned after midnight and asked: "Do you have any books in English?" before he was escorted out again, police said. The building, which also contains a synagogue, is open 24 hours a day.

The jerky clip of the final confrontation posted online showed Peters in a waist-length jacket and hat with a knife in his right hand, surrounded by officers with drawn weapons and Jewish students wearing traditional plain Orthodox clothing.

Some of the students appeared to be trying to defuse the situation, urging Peters to calm down and asking officers not to shoot him.

He eventually put the knife down at an officer's urging and stepped away, but quickly picked it up again as the officer approached him, apparently to arrest him.

Officers yelled at him repeatedly to drop the weapon as Peters moved around, and a single gunshot could be heard. The shooting itself took place outside camera range.

Peters had lunged at the officer with knife, which had a 4½-inch blade, police said.

At least one witness said he heard Peters repeatedly saying, "Kill the Jews!" according to Rabbi Chaim Landa, a Chabad-Lubavitch spokesman. Police quoted Peters as saying instead, "I'm going to kill all of you."

Mayor Bill de Blasio praised the work of the police. "These officers handled the situation very admirably," he said.

Chabad-Lubavitch is a large, worldwide Hasidic movement that runs schools, synagogues and other institutions and reaches out to nonobservant Jews to encourage them to embrace their heritage and religious traditions. It is active on college campuses and in cities around the globe.

Peters had a documented history of mental illness and had been arrested 19 times since 1982, most recently in 2006 for drugs, police said.

Attorney Jeffrey A. St. Clair, appearing at the Peters family's front door in Valley Stream, on Long Island, described him as bipolar. St. Clair said the family had no warning of an outburst.

"Calvin Peters was a loving and devoted father," he said. "And the family is quite frankly shocked and disappointed at what happened."

Next-door neighbor Lorraine McCartney called Peters as "a very nice man" who had attended parties in her backyard. "I would never believe that of him. Never," she said.