(CNN) A New York man was arrested and charged with hate crimes after anti-Semitic messages were found in a temple, police said.

James Polite, 26, faces multiple charges, including fourth-degree criminal mischief as a hate crime and second-degree aggravated harassment as a hate crime in connection with anti-Semitic remarks found at the temple and fires set at several locations in Brooklyn hours later.

On Thursday night, graffiti was found on four floors of the Union Temple in Brooklyn's Prospect Heights neighborhood, some of which said "Hitler," "Jews better be ready" and "Die Jew rats we are here," the New York Police Department said.

Polite was also charged with second-degree arson and second-degree reckless endangerment -- both hate crimes -- in connection with a fire set early Friday in the coat closet of a Yeshiva school on Hewes Street in the Williamsburg neighborhood and fires at six other nearby locations, the NYPD said.

The locations appear to be associated with the Jewish community in Brooklyn.

A janitor at the Yeshiva school noticed the fire, which was likely set between 2 and 2:30 a.m., and called authorities, NYPD Sgt. Lee Jones said. Police apprehended Polite at the scene. He was taken to Woodhull Hospital in Brooklyn for a psychological evaluation, Jones said.

While Polite was at the hospital, police determined he was the same man wanted in connection with the anti-Semitic graffiti found at Union Temple, Jones said.

New York City Mayor Bill de Blasio attended Shabbat services at the temple Friday night as a show of solidarity.

After the service, he told journalists the incident was a horrible act of hate and "deeply disturbing to all New Yorkers."

"But it is particularly painful for members of the Jewish community who feel very vulnerable right now, who feel under attack," de Blasio said.

Gov. Andrew Cuomo said he was directing the state's hate crime unit to investigate.

"The disgusting rhetoric and heinous violence in this nation has reached a fever pitch and is ripping at the fabric of America, and it must stop," he said. "In New York, we have forged community through chords of commonality and we will always stand together against hate and discrimination."

As of Monday morning, Polite was still at Woodhull Hospital. He has not appeared in court, the NYPD said. No arraignment has yet been set, according to Oren Yaniv, a spokesperson for the Brooklyn District Attorney's Office.

Suspect had troubles, mentor says

Polite learned he had bipolar disorder after he entered a required rehabilitation program in 2015, according to The New York Times , who profiled Polite in December 2017. Polite smoked marijuana as a way to manage stress during college, according to the Times, and was placed on a "health leave of absence" before entering the rehabilitation program.

Former New York City Council Speaker Christine Quinn said she met Polite at a gay pride rally for Barack Obama in 2008. Polite had an internship with Quinn when she was on the council, according to Julia Schechter, a spokesperson for Quinn.

Quinn tweeted that she and others have tried to help him as he went through the foster care and mental health systems and he dealt with homelessness.

"The actions he is accused of break my heart and devastate all of us who tried to help him get on solid footing over the years. And while he has experienced hardship that most people can't ever imagine, his actions are inexcusable," she wrote.

The Times story said Polite worked for Quinn on initiatives to fight hate crimes, domestic violence and sexual assault. Quinn was in regular contact with Polite, but more recently, he seemed incoherent in conversation. When he stopped responding to her messages a few weeks ago, she told the Times she knew something was wrong.

Polite began living with foster parents, Jenny Levison and Josh Waletzky, six years ago, according to a joint statement from Levison and Waletsky. They said they supported Polite through his mental health issues and drug addiction and said they were "deeply saddened" by his arrest.

"As Jews and New Yorkers, we are profoundly shaken and feel personally impacted by these acts, and our hearts break for all who are impacted," Levison and Waletsky said. "The acts perpetrated in our city come at a troubling time, when violence and acts of intimidation against Jews and other vulnerable communities is on the rise across the country ... we remain committed to building a fair and just New York and country — together with people of all faiths, races, ethnicities, and cultures."

Polite had been a volunteer for Obama's first presidential bid, registering voters and canvassing neighborhoods in New York, the Times reported. An Obama spokesperson declined to comment on Sunday.

Polite graduated from Brandeis University in Waltham, Massachusetts in 2018, according to a university spokesperson, Julian Cardillo, who did not provide additional details of Polite's time at the university.

Other cities recently saw anti-Semitic acts

Swastikas have appeared in at least a handful of US cities since a massacre in Pittsburgh in which 11 worshippers were killed.

On Wednesday morning, a New York resident posted pictures of swastikas that had been scrawled on homes in the Brooklyn Heights neighborhood.

The Nazi symbols also appeared on Navy property this week in Bucks County, near Philadelphia. Warminster Township Manager Gregg Schuster posted online that local officials have been in contact with the Navy to get the symbols removed.

"The use of the swastika is a cowardly act," he said. "In light of what our neighbors in Pittsburgh recently went through, I hope we can refrain from using these symbols of hate. There is no place in Warminster for this disgusting act and I know our community will never accept this behavior."

A swastika also was found scrawled on a piece of paper in an elevator Monday at the Eastman School of Music in Rochester, New York, according to CNN affiliate WHAM.

Also this week, authorities said a synagogue in Irvine, California, had been vandalized with anti-Semitic graffiti.

Someone spray-painted "F*** Jews" early Wednesday on the wall of Beth Jacob Congregation in Irvine, police said.

Anti-Semitic incidents have been increasing in the United States in the last few years, according to the Anti-Defamation League.

The Rabbinical Assembly, an international association of conservative rabbis, said last weekend's shooting is a reminder that anti-Semitism "is on the rise in America at a rate unprecedented in decades."

There were 151 anti-Semitic hate crimes complaints in the city of New York in 2017, according to a report on the police department website.