"Terrorism threatens both our countries. Pakistan has suffered heavily...," Cameron, who is here on a day-long visit, said at a joint press conference following his meeting with Prime Minister Yousuf Raza Gilani.
His comments came months after Cameron had charged Pakistan with looking "both ways" on the issue of terrorism during his visit to India in July last year.
Cameron had said that it was not right for Pakistan to have any relationship with groups that were promoting terror, in comments that were seen as endorsing India's stand.
However, the British Premier today said he had come here "to mark a new chapter in the relationship between our two countries" and announced a 650-million-pound aid for this country's education sector.
The money, to be spent over the next four years, will be used to build or refurbish schools, train teachers and provide education to an extra four million children.
He also said the US and Pakistan have agreed to work on doubling the existing bilateral trade in the next few years. The bilateral trade currently stood at 1.9 billion pounds.
Cameron, who is on his first visit to the country, said the UK wanted to work with "our friends in Pakistan". He said he had "very good and very detailed" discussion on the issues of education, healthcare, trade and security among others.
He said it was in the interest of both Pakistan and the UK to have a peaceful and democratic Afghanistan.