United States President Barack Obama is vowing to wipe out terrorists from Pakistani safe havens, warning that al Qaeda is plotting catastrophic attacks.
The comments came as Mr Obama unveiled a sweeping new Afghan war strategy.
He says restive Pakistani border regions are the most dangerous place in the world for Americans and described al Qaeda as a cancer that could devour Pakistan.
He described the situation in Pakistan as increasingly perilous.
The strategy places stabilising Pakistan at the centre of the reframed US approach to fighting what Mr Obama called an unfinished and bloody battle against al Qaeda.
He also called on US allies to join a big new civilian effort to stabilise Afghanistan, and says he will not turn a blind eye to government corruption.
He says goal must be to disrupt, dismantle and defeat al Qaeda in both Afghanistan and Pakistan.
Mr Obama announced plans to spend $US7.5 billion in Pakistan over the next five years on building schools and infrastructure.
The US will also send an extra 4,000 troops to Afghanistan to train security forces.
Afghanistan's government says Mr Obama has recognised that the al Qaeda threat comes mainly from Pakistan, while Pakistani Prime Minister Asif Ali Zardari says the strategy will strengthen democracy in his country.
Afghan President Hamid Karzai says the change in strategy is "exactly" what his country has been asking for.
Meanwhile, Pakistan's army says its troops have killed 26 militants in an attack near the Afghan border.
It says the battle took place in Mohmand, in the North-West Frontier Province, a hub for Taliban fighters.
A day earlier, a bomb has exploded at a mosque in the town of Jamrud in the Khyber region of northwest Pakistan, killing at least 50 people.
Officials say they fear the death toll could rise to 70.
The attack was a suicide bombing during a prayer time, and the mosque has collapsed.
Northwest Pakistan has witnessed a number of suicide attacks linked to the Taliban insurgency and also to the Shia-Sunni sectarian divide.
Provincial rule for Punjab
Mr Zardari says he wants to end central rule in Punjab and back the return of a provincial government led by an opposition party in order to reconcile with his rival.
The one-year-old government led by his Pakistan's Peoples' Party was plunged into crisis this month when former prime minister Nawaz Sharif's drove through Punjab at the head of mass protests.
The government placed barricades round the capital Islamabad and put the army on alert.
Mr Zardari defused the crisis by submitting to protesters' demand for the reinstatement of the Supreme Court Chief Justice.
Mr Zardari says he will let Mr Sharif's party take power again in Punjab, Pakistan's biggest province.