The two presidents said they would fight the region's problems together
Pakistan's newly sworn-in president, Asif Ali Zardari, and Afghan President Hamid Karzai have said they will stand together to fight terrorism.
Mr Zardari said at a joint news conference shortly after he took the oath of office he had a "comprehensive plan" to fight Islamist militants.
Mr Zardari was swept to the presidency in a parliamentary vote following Pervez Musharraf's resignation.
He faces an economy in crisis and a rampant Islamist insurgency.
Mr Zardari's surprise decision to hold a joint news conference with Mr Karzai just a couple of hours after he was sworn in shows that the "war on terror" is his top priority, says the BBC's Syed Shoaib Hasan in Islamabad.
Many Pakistanis, who see inflation and a faltering economy as their main concerns, had been expecting a policy statement.
Domestic political troubles were also shunted aside in the question and answer session that seemed to focus more on sending positive messages to the international community, our correspondent says.
Mr Zardari paid tribute to his late wife, saying: "I accept the presidency of Pakistan in the name of... Benazir Bhutto. I accept this in her name and in the name of all the martyrs of democracy."
He took over leadership of the Pakistan People's Party (PPP) from her after she was assassinated in December.
ASIF ALI ZARDARI
Widower of assassinated former PM Benazir Bhutto
Took over her PPP after her death in December
Spent 11 years in jail on corruption charges, but not convicted
With Mr Karzai at his side, Mr Zardari said: "Pakistan intends to work with you, along with you."
He said the government of Pakistan "already has a comprehensive plan" to fight militancy.
Mr Zardari dismissed questions about Pakistan's commitment to fighting Islamist militancy, saying he himself had been a victim of terrorism.
Pakistan and Afghanistan were like "twins joined" said Mr Karzai. "They are inseparable," he said, adding that they suffered "the same problems, the same evils."
He added: "Afghanistan will be there in each step that you take in our joint struggle for peace and prosperity in the region... in each step that you take in the war against terrorism."
In the past, Mr Karzai has accused Pakistan of not doing enough to stop militants crossing into Afghanistan to launch attacks.
But repairing relations with Afghanistan is just one of the tasks facing Pakistan's new president.
His greatest challenge will be how to develop an effective policy to deal with the Islamist insurgency, say analysts.
This will include dealing with an increasingly aggressive US ally, which has stepped up direct strikes against militant targets in Pakistan's border region.
India has welcomed the election of Asif Zardari but officials there question whether the military will allow a civilian president to run the country alongside a democratically-elected prime minister, correspondents say.
'Long live Bhutto'
Mr Zardari smiled nervously as he stumbled through his oath-taking ceremony as the 12th president of Pakistan, our correspondent says.
Asif Ali Zardari is sworn in as president
Mr Zardari's son Bilawal - co-chairman of the PPP - was in the audience with his two sisters Bakhtawar and Asifa and Benazir Bhutto's sister Sanam, who shed tears as the ceremony was about to begin.
Mr Zardari was greeted by applause and a fanfare as he entered the hall. After he took the oath there were cries of "long live Bhutto".
Pakistan's president is elected by secret ballots in the national and four provincial assemblies.
Mr Zardari won 481 votes out of 702, far more than the 352 that would have guaranteed him victory, leaving his two rivals trailing far behind.
It is a very significant day in the history of Pakistan
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.