Investigators tried to determine Monday whether a man with a cache of pipe bombs and other weapons at his apartment was targeting synagogues and homes he had defaced in his Brooklyn neighborhood, a ranking police official said Monday.

Officers went to Ivan Ivanov's apartment after he reported being shot on Sunday evening, police said. Investigators, who said the wound to his finger was self-inflicted, discovered what appeared to be a homemade bomb and several other devices and weapons.

A police official, who spoke on condition of anonymity because the investigation is continuing, said Ivanov told police he planned to use the explosives on a fishing trip, detonating the devices underwater to bring the fish to the surface.

Investigators seized his computer and were searching the files, the official said.

Ivanov had been suspected of spray-painting anti-Semitic graffiti in September on three houses, two cars and the staircases of two synagogues in his neighborhood but had not been charged, the official said.

After the weapons were discovered, he made statements implicating himself in the graffiti case and was arrested on hate crime charges, the official said.

Ivanov, 37, pleaded not guilty Monday to charges of aggravated harassment and criminal mischief as a hate crime, as well as criminal possession of a weapon and reporting a false incident. Bail was set at $300,000 bond or $150,000 cash, the Brooklyn prosecutor's office said.

Ivanov's Legal Aid lawyer did not immediately return a call seeking comment. A court hearing has been set for this week, the prosecutor's office said.

Police were also trying to reach Ivanov's roommate, a medical anthropologist and associate professor at Columbia University's Mailman School of Public Health. Residents of the Brooklyn Heights building said the professor was doing research out of the country.

The building and others in the tree-lined neighborhood near the Brooklyn Bridge were evacuated for several hours while the bomb squad investigated early Sunday.