No victims have been reported in the outbreak of violence on an estate of tower blocks called La Castellane, in the north of the city, known as a drug trafficking hotspot.
Ironically, the incident began just hours before Prime Minister Manuel Valls was due to visit the southern port city to welcome what he had termed “excellent” results of measures introduced to fight crime over more than two years.
It was not immediately clear what sparked the violence but Marseille is known for gang-related gun crime and local politicians have even in the past called for the army to be sent in to some of the toughest neighbourhoods.
According to a source close to the case, residents in the housing estate, where a 25-year-old was shot dead last month in a settling of scores, alerted the police earlier Monday that "five to ten" hooded people had fired "Kalashnikovs" in the air.
There were no victims, the source added, and police rushed to the scene to deal with the situation.
On their arrival, they were shot at while still in their cars, said local public security director Pierre-Marie Bourniquel, who is running the operation.
Children who were in a creche in the estate were moved to a neighbouring school, according to the source, who wished to remain anonymous.
Security forces are still hunting for those who fired the Kalashnikovs, and riot police will deploy in the estate over the next few days, Bourniquel said.
Police say much of the violence in Marseille is linked to turf wars between multiple rival gangs battling for control of the drugs trade in the city's poorest neighbourhoods.
The situation is made worse, according to police, by the easy availability of high-calibre weapons such as Kalashnikov automatic rifles.
In 2013, Valls, who was then interior minister, had warned that entire neighbourhoods were "lost to the dealers."
But in an interview with regional daily La Provence just ahead of his visit, Valls said crime in the city had tumbled, pointing to a 30-percent drop in armed robberies over two years and a 20-percent fall in physical violence against people.
Marseille has been a Mediterranean trading hub since antiquity and has long had a reputation as a hotbed of crime.
Drugs-related crime is also not new, with the city's central role in the international heroin trade famously portrayed in the 1971 film "The French Connection".
That trade was controlled by powerful international syndicates and the heroin passing through Marseille was largely destined for other markets.
In contrast, the current violence is seen as the product of a free-for-all in the supply of marijuana and related soft drugs to the local market.