A retired Hoboken police officer who lives in Bayonne was charged with aggravated assault and weapons offenses after allegedly waving a gun at a man building a fence at the rear of his property, officials said.

Bail was set at $50,000 cash or bond when Patrick J. Iapicca Jr., 48, of East 22nd Street, made his first court appearance on the charges today via video link from Hudson County jail in Kearny.

At 10:15 a.m. on Friday, the retired officer allegedly approached the man installing the fence while waving a 9mm Smith and Wesson semiautomatic handgun, the police report says.

When the worker asked Iapicca if he was threatening him, the former officer tucked the gun into his waistband and walked back to his home, the report says. Iapicca later told police he was trying to tell the worker, and three Bayonne residents, to stay off his property, the report says.

After the incident, police went to Iapicca's home, confiscated the gun, and arrested him on the charge of aggravated assault for waving the gun in front of the man, as well as possession of a weapon for an unlawful purpose and unlawful possession of a weapon, according to the police report and the criminal complaint.

The police report says Iapicca was unable to locate his firearm identification card while officers were at his home.

Court officials said Iapicca retired two years ago.

Iapicca was represented by attorney Brian Neary, who had no comment following today's hearing in Central Judicial Processing court in Jersey City.