Image caption David Cameron made the remarks in Pakistan

David Cameron has suggested that Britain and the legacy of its empire was responsible for many of the world's historic problems. But is that view fair?

Answering questions from students in Pakistan on Tuesday, the prime minister said: "As with so many of the problems of the world, we are responsible for their creation in the first place."

Here two historians give their view.

Nick Lloyd, lecturer in defence studies, King's College London

Mr Cameron's remarks about the painful legacy of colonialism could not be further from the truth and they reveal a disappointing lack of historical judgment. The British Empire in India, known as the Raj, was the greatest experiment in paternalistic imperial government in history.

By the time the British left India in 1947 they had given the subcontinent a number of priceless assets, including the English language, but also a structure of good government, local organisation and logistical infrastructure that still holds good today. Far from damaging India, British imperial rule gave it a head start.

The empire gave its colonies real, tangible benefits

At the centre of this was the Indian Civil Service, the 1,000 strong "heaven-born" group of administrators that ran the country. Their role in laying the foundations for strong, efficient government in India has never been accorded the respect and admiration it deserves.

While history has recorded that the ICS were aloof and disdainful of the "natives", in reality, the men who ran India were selfless, efficient and - most importantly of all - completely incorruptible.

Not only did they oversee the spread of good government, western education, modern medicine and the rule of law, they also put in place local works, famine relief, and irrigation projects, most notably in the Punjab, which benefited enormously from what was then the largest irrigation project in the world.

Perhaps the most priceless asset of all was the English language itself, which gave a unity to the subcontinent that it had never known before and which is allowing India's people to do business around the world today with great success.

Indeed, it is indicative of this that in February 2011, a Dalit (formerly untouchable) community in Uttar Pradesh built a shrine to the goddess English, which they believe will help them learn the English language and climb out of their grinding poverty.

Although Britain was not able to replicate its success in India everywhere across its vast colonial empire, it is still clear the empire gave its colonies real, tangible benefits. Wherever the British ruled, they erected a light, relatively inexpensive form of government that was not corrupt, was stable, and was favourable to outside investors.

Its imperial civil servants may not always have been completely sympathetic to local peoples, but they were always motivated by humanitarian impulses and did their best in often difficult circumstances. Indeed, when we look at Africa, many of the benefits of imperial rule were squandered in the generations after independence with a succession of corrupt and brutal regimes.

Dr Nick Lloyd is the author of the forthcoming book The Amritsar Massacre: The Untold Story of One Fateful Day

Andrew Thompson, professor of imperial and global history, University of Leeds

Does Britain's colonial legacy still poison its relations with Africa, the Middle East and Asia? Mr Cameron's remark raises important questions for society about how we relate to history.

Detention without trial, beatings, torture, and killings punctuated the twilight years of colonial rule

There's the inheritance of colonial violence. What you saw in the later stages of empire was a series of British counter-insurgency operations, exported from one hot spot to another. In places such as Kenya, Palestine, Malaysia, Zimbabwe, and of course Northern Ireland, the British were forced to resort to repressive legal and military measures in what was to prove an ultimately vain attempt to curb the tide of political unrest and nationalist opposition.

Detention without trial, beatings, torture, and killings punctuated the twilight years of colonial rule. The disclosure this week of a large tranche of Foreign Office files, hitherto kept secret about full extent of British brutality against Mau Mau in Kenya, suggests there may be further revelations still to come. Will there be similar stories and claims from Palestine, Malaya, Cyprus or Nigeria?

There is also the question of whether the violence that characterised these counter-insurgency operations during decolonisation then set the scene for the way in which independent, post-colonial African and Asian governments dealt with political dissent from their own peoples.

The imperial past is far from being dead. On the contrary it is actually very much part of contemporary politics.

Perhaps we should not be surprised then when British foreign policy interests and interventions today are seen and perceived as "neo-colonial" in their nature.

The reaction of Iran in 2007 when 15 Royal Navy personnel were seized is instructive here. As heavy-handed as it may have seemed to people in Britain, it needs to be understood in the wider context of Iranian sensitivities over the presence of any western powers in or near its territorial waters - sensitivities arising in part from a very fraught and fragile 20th Century relationship over oil and territory.

In a deeper and more fundamental sense still, Britain's colonial legacy can be seen in the ways in which globalisation is being experienced today. From the 1870s onwards, the integration of labour, capital and commodity markets promoted by empire was very much skewed towards its "white" settler societies.

The economic benefits of empire for the so-called dependent colonies were much more meagre in comparison or did not exist at all. When we find critics of globalisation questioning whether economic integration and cultural diversity can comfortably co-exist, we should remember that for much of the last century the form of globalisation the world experienced rested on a view of social relations governed by racial hierarchies.

Finally, we might reverse the colonial encounter and think about how empire has left an imprint on British society. Despite its multi-ethnic empire, Britain did not embrace ethnic diversity at home.

There was the rhetoric of an inclusive imperial citizenship for the peoples of all Commonwealth countries. But in reality in post-war Britain there was little desire to promote integration for immigrants from the likes of the West Indies and the Indian subcontinent.

The consequences are perhaps reflected in experiences today, especially in terms of the so-called ethnic penalty many of these communities face in education, employment or housing.