Defense Secretary Robert Gates said the Taliban had overreached in their attempt to claim new territory in Pakistan, after a day in which Pakistani soldiers drove the militants from a strategic mountain pass. In testimony before the Senate Appropriations Committee Thursday, Mr. Gates and Secretary of State Hillary Clinton praised Pakistan for its military offensive this week to dislodge the Taliban militants who had taken over a district 70 miles from Islamabad. The government's air-and-ground offensive began after the Taliban forcibly took control of Buner -- an act Mr. Gates said may have convinced Islamabad the group posed a threat to Pakistan's future. The country has long seen India as its primary adversary and has been slow to accept U.S. warnings about the dangers posed by the Taliban. The U.S. has criticized Pakistan for making a peace deal in February with the Taliban in Swat Valley, which borders Buner, in an attempt to halt 18 months of fighting. U.S. officials said Thursday the Obama administration was finalizing plans to train Pakistani forces in an undetermined third country. U.S. commanders say Pakistani troops need counterinsurgency training to battle militants, but Pakistan has refused to allow many U.S. trainers into the country. Mr. Gates pressed lawmakers to quickly approve the Obama administration's $83.4 billion war-spending request, which includes $400 million to help Pakistani forces mount a campaign against the Taliban and other armed groups. The Pakistani military funding will be the first portion of a five-year, $3 billion plan. President Barack Obama said at a news conference Wednesday that while he was confident of the security of Pakistan's nuclear arsenal, he was "gravely concerned" about the country's stability. On Thursday, Pakistani troops drove militants from the Ambela Pass leading south from Buner, in the direction of the plains where Islamabad is situated. The military said it killed at least 14 militants and was moving north. The Swat truce allows the Taliban to establish Islamic law in an area that includes Swat and Buner. The Taliban say the deal also allows them to control these territories, a claim the government disputes. In a sign of instability elsewhere in Pakistan, street violence that began Wednesday in the southern port city of Karachi left at least 34 people dead before subsiding Thursday. Karachi has a history of tensions between the Pashtun population and the Urdu-speaking Mohajirs. The latest violence began after two activists from the dominant Mohajir political party were shot by unknown gunmen.