"Obama f----t" and "Obama d--e" was written five times on the front and sides of the garages, located on 23rd Street between 28th and 29th avenues in what appeared to be black spray paint. View Full Caption DNAinfo/Jeanmarie Evelly

ASTORIA — A man was arrested Friday in connection with a string of vandalism incidents in which he scrawled anti-gay slurs referencing President Barack Obama on buildings around the neighborhood, police said.

Yaakov Shemesh, 53, was arrested Friday and charged with 22 incidents of criminal mischief, aggravated harassment, making graffiti and criminal mischief with the intent to damage property, according to the NYPD.

Police say Shemesh, who lives in Astoria, vandalized a number of buildings around the neighborhood over several months, writing words like "Obama f----t" as well as "kill f-gs and d--es" and "f-gs f-gs."

Some locations were hit with the same graffiti messages several times, including a set of garages on 23rd Street between 28th and 29th avenues that was vandalized three times.

Pistilli Towers at 31-19 Newtown Ave., which houses the offices of State Sen. Michael Gianaris and Assembly Member Aravella Simotas, was also struck with the messages on three separate occasions.

"The acts of senseless vandalism our community was forced to endure in recent months were outrageous and unacceptable," Gianaris said in a statement Friday. "There is no amount of bigotry or xenophobia that can tear our diverse neighborhood apart."

The 114th Precinct also tweeted about the arrest.

The man pictured is now apprehended. Great job by POs Kenefick & Lichte, keep up your hard work & dedication to make #Astoria safe. pic.twitter.com/lamdqRA7Nd — NYPD 114th Precinct (@NYPD114Pct) June 2, 2017

The Queens District Attorney's office said Shemesh had not been arraigned as of Friday afternoon. Information on his defense attorney was not immediately available.