Police arrest a protester yesterday in Karachi, where public gatherings of more than five people were banned. Photograph: Mohammad Khalil/AP

Pakistan's biggest cities were brought to a virtual halt by an anti-government strike yesterday in the wake of the worst street violence the country has seen in 20 years, which killed more than 40 people over the weekend.

There were empty streets across Karachi, a city of more than 12 million people which was the centre of the weekend's bloodshed in clashes between supporters and opponents of President Pervez Musharraf.

"The city is totally paralysed. Shops are closed and very little public transport is on the roads. People are scared," Azhar Farooqi, Karachi's police chief, told Reuters news agency. The provincial authorities banned political rallies, or meetings of more than five people in a public place, and gave paramilitary troops orders to shoot anyone involved in serious street violence. Shops, markets and businesses were also closed by strike action in the second biggest city, Lahore, as well as Peshawar, Rawalpindi and Quetta.

Opposition groups blamed the bloodshed, in which 150 people were wounded, on supporters of President Musharraf, who is facing the most concerted challenge to his rule since he seized power in 1999 as he prepares to run for re-election later this year. Despite the rising pressure on his position, the president has ruled out martial law for the time being, but blamed the violence on "elements who tried to create turmoil by politicising".

In particular, the government is pointing its finger at Pakistan's chief justice, Iftikhar Chaudhry, whom President Musharraf suspended in March and is trying to dismiss. Mr Chaudry, and his campaign to keep his job, has become a focal point for popular discontent, uniting religious and secular opposition groups.

News of a visit by Mr Chaudhry to Karachi prompted demonstrations by opposition groups and the pro-Musharraf MQM party, a powerful force in the city's politics, and gun battles broke out on the streets. Mr Chaudry flew back to Islamabad without addressing a rally of supporters.

At least some of the killings appear to have been assassinations. Yesterday, a supreme court official with close ties to Mr Chaudry, Syed Hammad Raza, was shot dead at his home in Islamabad. Mr Chaudry's lawyers said he had been due to testify on Mr Chaudry's behalf in a supreme court hearing on government charges of misconduct. The dead man's widow said he was shot dead by gunmen on his doorstep and that there had been no attempt at robbery.

Mr Chaudry's supporters reject the government's misconduct charges, and claim Mr Musharraf is trying to oust him because he was a potential obstacle if the president's re-election bid this year hits constitutional challenges.

President Musharraf's hold on his country was hit by another blow yesterday when a border meeting between Pakistani and Afghan troops and US observers ended with one American soldier and one Pakistani soldier dead. Official reports said a convoy of military officers was ambushed by "miscreants" after they attended the meeting at a school in the town of Teri Mangal, in the Kurram tribal region. The talks had been arranged after a border clash between Afghan and Pakistani troops.

Local sources said that at least one member of the Frontier Corps, a Pakistani paramilitary group recruited from local tribesmen with regular army leadership, was involved in the attack. That could not be confirmed last night but one Pakistani source was quoted as saying that a man disguised as a Pakistani paramilitary soldier had opened fire.

"One ISAF [International Security Assistance Force] service member was killed and four ISAF service members wounded when they were ambushed by unknown assailants near Teri Mangel, Pakistan, after leaving a border meeting," a Nato statement said.

A Nato official said the incident was being investigated, but dismissed an account from the Afghan defence ministry that a Pakistani officer had opened fire at the US soldiers in the course of the meeting. Whether or not Pakistani forces are proved to be involved, the incident is likely to undermine Washington's already strained confidence in President Musharraf's ability to control the border region.

Pakistan accused Afghan troops of opening fire on its border posts. Afghanistan claimed Pakistani troops had "invaded" its Paktia province and said 13 Afghans had been killed in the clashes.