Official news agency quoted Musharraf as telling that foreigners hiding in the Tribal Areas are carrying out and supporting terrorist activities.
He was addressing the participants of the 88th National Management Course (NMC) and the Third Senior NMC at National Management College in Lahore.
Foreigners, especially Uzbeks and Afghans, who had links with Al Qaeda were hiding in Pakistan's tribal belt and the mountains, the president said. He said they carried out terrorist activities in Pakistan and provided resources for terrorism.
The president said the militant Taliban, who had links with the foreign militants, were also facilitating terrorism.
He said terrorism and extremist were hampering Pakistan's development and feared the spread of Talibanisation beyond the Tribal Areas to Swat and southern parts of the NWFP.
Some groups in Balochistan, such as the Balochistan Liberation Army, had a "separatist tendency", Musharraf said.
"We have to chalk out long-term strategy to address these grave problems."
New government: The new government could resolve Pakistan's problems, including terrorism if there was harmony between the coalition partners, the president said.
He stressed the continuation of the previous government's policies. Changing the previous government's policies would hinder Pakistan's development, he said.
Musharraf also stressed bridging the gap between the formulation and implementation of policies.
"The government sector faces two major problems – a large gap between policy formulation and implementation as well as lack of sustainability and continuation."
He said the delay in decision-making was also a major problem.
"The job of a government is to ensure security, progress and development of the country and welfare and well-being of its people," he said.