Cameron, who became the first western leader to visit Islamabad since election of Sharif in May, said Britain and Pakistan had a shared interest in the "battle against terrorism".
"This is a battle that requires a tough and uncompromising security response. But it is also a battle that has to go so much wider. Countering extremism and radicalisation, investing in education, tackling poverty, dealing in all the issues that can fuel extremism and radicalisation," he said.
Advocating strong Af-Pak ties, the British Prime Minister said, "I profoundly believe that a stable, prosperous, peaceful and democratic Afghanistan is in Pakistan's interest, just as a stable, prosperous, peaceful and democratic Pakistan is in Afghanistan's interest."
Cameron told Sharif he knew he and Afghan President Hamid Karzai "will work together towards those ends."
More From This Section
Responding to Cameron's appeal, Sharif said, "I have assured Prime Minister Cameron of our firm resolve to promote the shared objective of a peaceful and stable Afghanistan, to which the three million Afghan refugees currently living in Pakistan can return with honour and dignity."
Cameron, who arrived here after an unannounced trip to Kabul, said, "The UK will provide more equipment to tackle the scourge of improvised explosive devices. We will also support Pakistan in improving the security of its infrastructure' including safeguarding sporting events."
The British Prime Minister pledged to increase bilateral trade to USD 3 billion pounds by 2015. Both the sides also agreed to encourage strong participation for investment in the energy sector.