A Brooklyn Heights man arrested on charges of making pipe bombs has also confessed to scrawling swastikas and hate messages in the neighborhood, according to police, and they are trying to figure out if the suspect planned to target synagogues or other sites with the arsenal found in his apartment, sources said.

Investigators said Ivaylo Ivanov, 37, at first told them he needed the weapons — eight pipe bombs, including one stuffed in a foam football, handguns, a rifle, a shotgun, two silencers, a crossbow, gunpowder and machines to help build the bombs — for protection. He also told police he planned to use the bombs for fishing …

Ivanov was arrested Sunday after he called 911 and told police someone had shot him in the finger, but he told police later he had accidentally shot himself. Police who responded to his apartment said they found the weapons cache. Investigators are examining Ivanov’s computer.

Late Sunday, after more than 12 hours in custody on weapons charges, Ivanov told detectives he spray-painted swastikas or hate messages at two synagogues and four other buildings, on nine cars and on sidewalks.

The vandalism, mostly swastikas, included one four-foot-high symbol of hate inside an apartment building on Columbia Place, police said. The suspect also allegedly wrote “Kill all Jews” and “America hates Jews” on fliers left on two cars.

Ivanov’s lawyer, Adrian Lesher, said Ivanov is a linguist and is himself Jewish.

“The defendant basically led police to the apartment in a situation that was almost calculated,” Lesher said at the arraignment …

Early Sunday, Ivanov called 911 and said an attacker had shot him in the left index finger. Officers who responded to Ivanov’s Remsen Street apartment found the bullet lodged in a chair, then got a search warrant, finding the guns and crossbow on his mattress and the pipe bombs, complete with caps and fuses and believed to be fully functional, in a closet.

Ivanov lives in the apartment with Michael Clatts, an associate professor at Columbia University who specializes in studying the spread of infectious diseases …

A Brooklyn Heights man arrested on charges of making pipe bombs has also confessed to scrawling swastikas and hate messages in the neighborhood, according to police, and they are trying to figure out if the suspect planned to target synagogues or other sites with the arsenal found in his apartment, sources said.

Investigators said Ivaylo Ivanov, 37, at first told them he needed the weapons — eight pipe bombs, including one stuffed in a foam football, handguns, a rifle, a shotgun, two silencers, a crossbow, gunpowder and machines to help build the bombs — for protection. He also told police he planned to use the bombs for fishing …

Ivanov was arrested Sunday after he called 911 and told police someone had shot him in the finger, but he told police later he had accidentally shot himself. Police who responded to his apartment said they found the weapons cache. Investigators are examining Ivanov’s computer.

Late Sunday, after more than 12 hours in custody on weapons charges, Ivanov told detectives he spray-painted swastikas or hate messages at two synagogues and four other buildings, on nine cars and on sidewalks.

The vandalism, mostly swastikas, included one four-foot-high symbol of hate inside an apartment building on Columbia Place, police said. The suspect also allegedly wrote “Kill all Jews” and “America hates Jews” on fliers left on two cars.

Ivanov’s lawyer, Adrian Lesher, said Ivanov is a linguist and is himself Jewish.

“The defendant basically led police to the apartment in a situation that was almost calculated,” Lesher said at the arraignment …

Early Sunday, Ivanov called 911 and said an attacker had shot him in the left index finger. Officers who responded to Ivanov’s Remsen Street apartment found the bullet lodged in a chair, then got a search warrant, finding the guns and crossbow on his mattress and the pipe bombs, complete with caps and fuses and believed to be fully functional, in a closet.

Ivanov lives in the apartment with Michael Clatts, an associate professor at Columbia University who specializes in studying the spread of infectious diseases …