By Roland Buerk
BBC News, Islamabad
President Pervez Musharraf has said he is angered when Pakistan is blamed for fostering extremism in the world.
Countries must cooperate on terrorism, says President Musharraf
After the 7 July London bombings, British Prime Minister Tony Blair called on Pakistan to crack down on extremists in religious schools.
Speaking to the BBC World Service, President Musharraf said nations should work together to fight terrorism.
The role of Pakistani extremists has come under scrutiny since the attacks on London's transport network.
Although British, three of the bombers were of Pakistani descent.
Two of them visited the country last November, although it is not clear if they met militants.
President Musharraf said Pakistan was not responsible for terrorism in other countries.
"When people just get up and start accusing Pakistan, that annoys me," he told the BBC.
The president called for a balanced approach.
"I keep saying in the fight against terrorism the coalition must encourage each other, coordinate efforts, cooperate with each other.
"That is a better course of action rather than straight throwing blame on each other. That is counterproductive, I think," he said.
President Musharraf said he believed al-Qaeda's command and control structure in the country had been demolished and he doubted whether the London bombers had received orders directly from Osama Bin Laden.
The president has ordered all foreign students to leave and for the religious schools - or madrassas - to register with the government.
More than 600 people have been detained by the police in a crackdown on extremists in the past two weeks.