Two bombings killed 21 people in northwestern Pakistan on Sunday, just as Britain's prime minister was in the capital pledging to help to fight extremism.
In the deadlier of the two attacks, a car bomb exploded as a convoy of paramilitary troops passed through the outskirts of the northwest city of Peshawar, killing at least 17 people and wounding dozens of others, police said.
Most of the dead and wounded were civilians, although nine paramilitary Frontier Corps troops were hurt, said police official Shafiullah Khan. The blast struck one Frontier Corps vehicle, but the other passed by safely.
The explosion damaged many other vehicles and shops in the area, according to local TV video. Frontier Corps vehicles rushed to the scene, and a police officer collected evidence from the crater caused by the bomb.
Later in the day, a roadside bomb struck an army convoy and killed four soldiers in the North Waziristan tribal area, the main sanctuary for Taliban and al-Qaida militants in the country, said intelligence officials, speaking on condition of anonymity because they were not authorized to talk to reporters. The blast also wounded 20 soldiers, the officials said.
No one has claimed responsibility for the attacks, but suspicion will likely fall on the Pakistani Taliban. The group has been waging a bloody insurgency against the government for years that has killed thousands of security personnel and civilians. The militants have proven resilient despite a series of army offensives against them in the tribal region.
British Prime Minister David Cameron told his Pakistani counterpart, Nawaz Sharif, that Britain would do all it can to help fight extremism, a battle that he said requires both a tough security response and measures to fight poverty and promote education.
Britain pledged to provide Pakistan more equipment to battle the kind of improvised explosives that killed the soldiers in North Waziristan and to share expertise in protecting sporting events. Britain hosted the Olympic Games last summer.
"The enemies of Pakistan are enemies of Britain, and we will stand together and conduct this fight against extremism and terrorism together," Cameron said at a joint news conference with Sharif in the Pakistani capital, Islamabad.
Cameron arrived in Pakistan following a visit to neighboring Afghanistan. He welcomed Pakistan's stated commitment to help promote a peace deal with the Afghan Taliban.
Pakistan is seen as key to any deal because of its historical links with the insurgents. Pakistan pushed the Taliban to carry through with its recent step to set up a political office in the Gulf country of Qatar, although acrimony between the insurgents and the Afghan government has hampered the negotiation process.
"I assure Prime Minister Cameron of our firm resolve to promote the shared objective of a peaceful and stable Afghanistan to which the 3 million Afghan refugees currently living in Pakistan can return with honor and dignity," Sharif said at the news conference.
Sharif has also pushed for peace talks with the Pakistani Taliban, although a series of attacks by the group since he took office in early June have led many to question that approach.
The Taliban claimed responsibility for shooting to death 10 foreign mountain climbers and a Pakistani guide in northern Pakistan a week ago, an attack the group said was retaliation for a U.S. drone strike that killed the Taliban's deputy leader.
The Taliban withdrew their offer of peace talks with the Pakistani government following the drone strike. The government continues to stick by its stance that negotiating with the group is the only way to bring peace.
Critics of talks point out that past peace deals eventually collapsed, offering the militants a chance to regroup. They also note that the Taliban reject Pakistan's democratic government and believe Islamic law should be applied throughout the country.
Associated Press writers Sebastian Abbot and Zarar Khan in Islamabad and Rasool Dawar contributed to this report.