A 37-year-old man pleaded not guilty Sunday to attempted murder in a knife attack that wounded five people at a rabbi's home in Monsey, New York. Gov. Andrew Cuomo called the attack an act of "domestic terrorism."

Brad Weidel, the police chief of Ramapo, which provides police and government services for Monsey, said a man armed with a blade attacked at around 10 p.m. , on the seventh night of Hanukkah. The attacker was arrested by New York police nearly two hours later in the Harlem section of Manhattan, NBC New York reported.

Ramapo police identified the suspect as Grafton Thomas, 37, of Greenwood Lake in nearby Orange County.

Weidel said the victims were taken to two hospitals. Their conditions were not released.

The suspect was caught in a car after license plate readers in Harlem and on the George Washington Bridge were able to locate him, a senior law enforcement official told NBC News. Investigators requested a search warrant for the vehicle to determine whether the weapon was inside.

Thomas pleaded not guilty Sunday to five counts of attempted murder and one count of burglary, NBC New York reported. Partial cash bail was set at $5 million.

Grafton Thomas, the suspect in a stabbing at a Hannukah celebration, leaves Ramapo Town Hall in Airmont, New York, after his arrest in New York City on Sunday, Dec. 29, 2019. Kena Betancur / AFP - Getty Images

Thomas' family said in a statement Sunday night that Thomas has "a long history of mental illness and hospitalizations" and that his attorney, Michael H. Sussman, had been instructed to seek "immediate mental health evaluation of Grafton."

The family said Thomas has "no known history of anti-Semitism" and was not a member of any hate groups.

"We express our deepest concern and prayers for those injured physically and otherwise deeply affected by the events of Saturday night and our family's earnest yearning for their well being," the family said.

Ramapo Town Supervisor Michael Specht said the attack took place during a Hanukkah celebration at the home of Rabbi Chaim L. Rottenberg, next to a synagogue. Monsey is an enclave of ultra-Orthodox Jews about 35 miles from New York City.

At least one of the victims was "seriously hurt," he said.

Chabad.org, the website of the Chabad-Lubavitch Hasidic movement, published details that the organization's spokesman, Rabbi Motti Seligson, said were based on the accounts of witnesses and other sources.

Police stand guard on Sunday as news media gather outside the home of a rabbi where five people were injured in a machete attack during a Hanukkah gathering in Monsey, New York. Kena Betancur / AFP - Getty Images

The site reported that the attacker was wearing a scarf over his face and that, after stabbing five people and being chased from the home, he tried to get into the synagogue but it was blocked from the inside by worshippers who had barricaded the door. The victims, according to the organization, were Hasidic Jews.

Cuomo visited Rottenberg early Sunday before meeting with Jewish leaders in Monsey.

"This is an intolerant time in our country," he told reporters outside the rabbi's home on Sunday morning. "We see anger. We see hatred exploding."

He added: "It is an American cancer on the body politic."

He said he thought the crime was an act of domestic terrorism and expected it to be prosecuted as such.

The violence comes after at least eight other attacks this month on Jewish people in New York City.

Jonathan Greenblatt, chief executive of the Anti-Defamation League, said on Twitter late Saturday that "after the hateful assaults we saw this past week in Brooklyn and Manhattan, it is heart-wrenching to see the holiday of Hanukkah violated yet again."

"We need authorities to provide increased protection NOW and ensure that the full force of the law is brought down on those who perpetrate such horrific crimes," he added.

The Guardian Angels, a private, unarmed crime-prevention group, said earlier Saturday that it would start patrolling the Brooklyn borough of New York City's on Sunday because of the recent attacks. New York police said Friday that they would step up patrols in high-profile Jewish neighborhoods.

"Last night's attack in Monsey, Rockland County was a despicable display of hate," Terence Monahan, the police department's chief of department,said Sunday. "NYPD cops, like those who apprehended the suspect in Harlem, are protecting NYC's Jewish community."

There has been a spate of attacks on Jews across the nation since late 2018. On Oct. 27 last year, a man opened fire at Tree of Life synagogue in Pittsburgh, killing 11.

More recently, on Dec. 10, a couple opened fire at a kosher market in Jersey City, New Jersey, killing a police officer and three other people who had been inside. The shooters were killed in the exchange of gunfire with law enforcement.

Bernice King, daughter of the Rev. Martin Luther King Jr. and chief executive of the nonprofit King Center, described Saturday night's attack as an assault "against a people and a promise."

"I am praying for our Jewish family members and I encourage us all to refuse to adjust to anti-Semitic stereotypes and to rhetoric/language that dehumanizes," she said on Twitter. "We can't pretend that hate is dormant."

Israeli President Reuven Rivlin also condemned the attack, saying on Twitter that a collective effort was needed to stop future incidents.

"Shocked and outraged by the terrible attack in #NY and praying for the recovery of those injured. #Antisemitism is not just a #Jewish problem, and certainly not just the State of #Israel's problem," he said.

"We must work together to confront this rising evil, which is a real global threat."

Download the NBC News app for breaking news

Senate Majority Leader Chuck Schumer, D-N.Y., called the attack an act of "pure evil" on Twitter on Sunday.

"The cascade in anti-Semitic attacks is outrageous throughout metropolitan New York and America, and must not be tolerated," Schumer said. "We need a thorough federal investigation of this specific attack and all of the recent attacks."

CORRECTION (Dec. 29, 2019, 6:10 p.m. ET): A photo caption in an earlier version of this article misidentified the man charged with stabbing five people in Monsey, New York. He is Grafton Thomas, not Thomas Grafton.