PARIS — Several men fired shots in the air on Monday in a poor suburb of Marseille while the French prime minister, Manuel Valls, was in the city to defend the government’s local security plan, police officials said. No one was wounded.

The gunmen are believed to be members of a gang who may have fired their weapons “to take revenge” on a rival group, said David-Olivier Reverdy, the spokesman for a police union in Marseille. “They didn’t target police officials,” he said, despite earlier reports that masked men had fired on officers.

The episode occurred in La Castellane, a housing project that has been blighted by drug crime and gang violence.

On Monday morning, several witnesses heard gunshots and called the police. The appearance of police officers prompted the gunmen to fire into the air again, Mr. Reverdy said.