The incidents showed some of the fault lines in nuclear-armed Pakistan ahead of elections next month that many predict could loosen Musharraf's grip on power at a time of surging violence blamed on al Qaeda and Taliban militants.
Musharraf is on a tour of Europe seeking to convince leaders there he is in control of the country and is committed to restoring full democracy eight years after he seized control in a military coup. He gave up his position as army commander in December as part of that transition.
Speaking at the World Economic Forum in Davos, Switzerland, Musharraf said his government would hold "free, fair and transparent" parliamentary elections next month, and "carry on the fight against terrorism and extremism."
The fighting on Wednesday and Thursday took place in the border province of South Waziristan, a militant stronghold where the rebel leader accused by the CIA and Pakistan's government of masterminding last month's assassination of opposition leader Benazir Bhutto is believed to be hiding.
The military announced in a statement that three districts in the region "had been cleared of militant strongholds and hide-outs" as a result of operations. It said 40 rebels had been killed and 30 others arrested. Eight soldiers also died, the statement said, giving no more details.
South Waziristan is a semiautonomous tribal region where the central government has never had much control. It is home to scores of al Qaeda and Taliban fighters who fled from neighboring Afghanistan after the U.S.-led invasion there in 2001.
The unrest in the normally quiet streets of the capital, Islamabad, came after a period of relative calm since the slaying of Bhutto triggered nationwide riots that caused billions of dollars (euros) in damage and the deaths of at least 40 people.
About 250 lawyers and other anti-government activists rallied to demand the release from house arrest of the ousted Supreme Court chief justice, Iftikhar Mohammed Chaudhry, who has been held incommunicado since Musharraf declared a state of emergency on Nov. 3.
The black-suited lawyers shouted "Go Musharraf go!" and "Musharraf is a dog!" as they tried to push their way through a maze of barbed wire and a cordon of riot police blocking the street leading to Chaudhry's house.
Police fired tear gas canisters at the protesters and beat several with sticks. The demonstrators then threw rocks at the officers. There were no reports of serious injuries or any arrests.
"This country is going into deep crisis and it's all because of one man - Musharraf," said protester Fatimah Ihsan. "He must go." Ihsan like others present vowed to step up protests in the weeks to come.
Nawaz Sharif, a former prime minister who returned from exile in November to lead a campaign against Musharraf, accused him of failing to bring peace in the tribal regions.
"The problem in the tribal regions will not be solved through the use of bullets, guns and gunship helicopters, but we need to win the hearts and minds of people there," Sharif told reporters in Peshawar, the capital of neighboring North West Frontier province.
The Pakistani leader has come under increasing pressure since Bhutto's assassination after her return home from eight years in exile to run in the elections, in which her party was widely expected to do well.
Opposition leaders have accused the government and intelligence agencies of complicity in the Dec. 27 attack.
Musharraf has blamed militants acting on behalf of al Qaeda for the killing. He has rejected calls for an independent, U.N.-led international inquiry, but has allowed a team of detectives from Britain's Scotland Yard to assist government investigators.
On Wednesday, the New York-based group Human Rights Watch urged the British government to pull Scotland Yard from the "flawed Pakistani investigation."
"Pakistan's investigation into Bhutto's murder lacks independence, transparency and credibility," it said. "Scotland Yard ... should not tarnish its reputation by lending its imprimatur to this dubious inquiry."
The group urged the U.S., Britain, and other countries to press Pakistan to accept a U.N. probe.