It was a more than typically murderous Saturday night in São Paulo: at 10pm, in the São Bernardo do Campo neighbourhood, a motorcyclist rode up to a private home, killed two of the residents, then sped away. An hour or so later in a nearby district, police shot and killed two men in what they said was an exchange of fire. Elsewhere police found the body of a man with a bullet through his brain – one of 14 people murdered and 12 injured in this single night amid a rising wave of violence in Brazil's biggest city.

At least 140 people have been murdered in São Paulo over the past two weeks in an outbreak of violent crime that has prompted early school closures, a change of municipal bus routes and street demonstrations. In September 144 people were killed. The causes are manifold, but a major factor appears to be an undeclared war between the largest criminal militia and the police, which has led to drive-by shootings, ambushes and other killings.

After initially denying the link, officials from the public safety department told local newspapers at the weekend that many of the killings of police had been ordered by imprisoned leaders of the First Capital Command criminal group in reprisal for a crackdown on the drug trade.

Non-governmental organisations, however, say the responsibility also lies with militias formed by former and serving police officers, who are used to skimming profits off the drug trade. So far this year, 92 former and current police officers have been gunned down.

Last week state and federal police said they would combine forces to create a new intelligence agency to counter the resurgent threat posed by organised crime.

Police jitters were apparent on Friday night when an off-duty officer, Edcarlos Oliveira Lima, killed the driver and passenger of a car that swerved in front of him. He claimed to have seen a gun in the vehicle and feared he was being corralled for a possible hit. However, witnesses and the victims' families say he needlessly killed two innocents. Oliveira Lima is under investigation.

There were 982 murders in the first nine months of this year in São Paulo, according to data released by the public security department. This is up 10% on last year and higher than the total in Rio de Janeiro.

Five hundred angry and worried residents of Brasilândia – one of the worst-affected areas – took to the streets on Sunday morning, carrying white roses, wearing T-shirts printed with the faces of some of the victims and shouting for greater vigilance.

Schools and shops in some São Paulo districts closed early last week due to concerns about the rising risks. "In view of the wave of violence in the city's south zone, the school's directors decided to send staff and students home early so as to assure their safety," Eliane Valerio de Souza, administrative assistant at a professional training school, told the newspaper Folha de S Paulo.

Regional authorities have played down the violence. Governor Geraldo Alckmin said the crime rate in Greater São Paulo was on the wane.

However, he warned the problem would not go away unless the national government took firmer measures to control the influx of drugs and guns along Brazil's extensive borders.

Despite the recent killings, São Paulo state is by no means the most violent in Brazil when its huge population is taken into account. Last year, this commercial powerhouse saw 10.1 homicides per 100,000 inhabitants compared with 74.5 in the most murderous state, Alagoas.

Until recently, the dominance of the First Capital Command was credited as a factor in the relatively low crime rates that São Paulo has enjoyed for most of the past decade. While Rio has been riven by frequent violence between competing gangs of drug traffickers, the war for control has largely been won in the commercial hub. But police crackdowns in 2001 and 2006 have resulted in surges of violence.

• The picture on this article was changed on 11 November 2012 to replace an image showing police in Rio de Janeiro