The recent discussions around the G4S Olympic security scandal highlighted two jaw-dropping facts, writes historian Michael Wood.

The first was that Britain still has the fourth largest military budget in the world, behind the USA, China and Russia.

In these days of gloomy introspection about the decline of the UK's military might, it was to say the least, a surprise.

But the second was no less amazing - that the personnel of G4S, a private British security company, is four times larger than the British Army.

Chief executive Nick Buckles has outlined a potential loss of at least £30m on its £284m contract for the Olympics but it soon became apparent that this was a drop in the ocean. The company's revenue in 2011 was about £7.5bn - and is rising.

G4S has a primary listing on London Stock Exchange, a former home secretary as "group consultant", and operations in over 125 countries - not bad for a security firm founded in 2004 and based in Crawley.

This is a company whose previously accident-prone record - as Group 4 Securicor - in running prisons and providing military security, had been criticised in parliament and provoked global protests about its employment practices.

And now the cash-strapped and resource-starved British Army has had to provide thousands of troops for the Olympics to fill the gap left by the failures of a private army.

It all set me thinking about history. Where had I heard such stories before? The private army of the Honourable East India Company, that's where.

The mother of all global multinationals, the story of the East India Company uncannily echoes that of modern giants, who trade in natural resources, make their profits and gain new spheres of influence through economic intervention.

Founded in 1600 to exploit the trade with India, the company's shareholders were wealthy merchants and aristocrats and the keys to its success were both commercial and military.

The shareholders of the East India Company were making huge profits from their commercial operations in India, operations that were secured and guarded by private armies working for the company and paid for by Indian taxpayers.

And when things went horribly wrong it was the Indian and British taxpayers who suffered and the British government and British armed forces that had to step in to sort out the disaster.

In the 17th Century India was not a single entity - it was divided between many different states. It was beset by internal divisions and Mughal power in the north was collapsing, which made it easier for the company to divide and rule.

As always in history, where there is a vacuum the go-getters and money makers move in to fill it.

There was a gold rush as the company began trading in Bengal under a permit from Shah Jehan, establishing textile factories in villages on the Hooghly River. They processed material from the village-based hand loom industry, and drew in hundreds of thousands of highly skilled weavers, dyers and washers, to manufacture a product now aimed at specific markets around Asia and in Britain.

Image caption The East India Company had its own currency

A crucial step came in 1717 when the increasingly powerless Mughal emperor in Delhi, acknowledging the facts on the ground, gave the company a grant of 38 villages near Calcutta, in what turned out to be a Faustian pact.

Now other European powers, particularly the French, began to smell the sweet aroma of profit so the company had to swell its private army to protect its interests.

At first the numbers were small - 2,200 Europeans and a similar number of native troops won the decisive battle at Plassey in Bengal in 1757 against the last independent Nawab of Bengal, who also had a tiny force from the French East India Company.

A similar size force gained victory at Wandiwash in the south where, between the 1740s and the 1760s, the British and the French fought out another part of their global confrontation. Then in 1765 in Delhi, the Mughal Shah Alam formally awarded the British the "diwan" of Bengal - that is, the right to raise revenues.

With that, the entrepreneurs were able to partly finance themselves with Indian taxpayers' money. Now the people of Bengal were paying their taxes to fund a private army to police them.

What had begun as a speculative piece of Elizabethan merchant-venturing had entered a new phase. And the recruitment of security forces accelerated, especially of local personnel, fighting in company uniforms, and trained in British military discipline.

A private army making profit for the company's shareholders with very little control from either the British or the Indian governments. Does this sound familiar?

In the south between the 1760s and 1799 the company fought four wars with the Muslim rulers of Mysore who were French allies, ending in the siege of the island fortress of Seringapatam in 1799 in which Sultan Tipu was killed.

The numbers of the armed forces at the disposal of the company had now soared to meet the new "security" opportunities.

Image caption Extra troops were deployed to the games after security provider G4S admitted it was short of staff

At Seringapatam their forces were 50,000 strong, the size of a big European army of the time. Investment grew, just as it would today, and in the next few years company profits rose astronomically. Their accounts registered with the British parliament show revenues rose from over £8m in 1794 to £13.5m in 1803.

You could say this is the moment that English starts to become the international means of communication and power

The value of this today is very difficult to calculate, whether you go for value in wages, prices, or real income, but that 1803 profit could be calculated as high as £48bn in today's money - a reasonable guess might be £20bn. G4S, Halliburton and Blackwater would be green with envy.

This changing situation is revealed in the vast archive of the company now preserved in the British Library on a staggering 11 miles of subterranean shelving.

In the aftermath of the victory over Tipu the governor-general Richard Wellesley, brother of the future victor of Waterloo, wrote:

"I shall retain full sovereignty of Seringapatam, for the company as being a tower of strength from which we may at any time shake Hindostan to its centre, if any combination should ever be formed against our interests.

"I shall not at present enlarge upon the advantages which are likely to be derived to the British interests from this settlement, they are too obvious to require any detailed explanation."

The conquest had happened piecemeal and opportunistically. It was effected by mercenaries, picking off regional threats one by one, establishing themselves on the ground as the local power, employing local security personnel with powers of coercion, employment and imprisonment.

By the 1830s the company archives reveal a shift from trade in textiles to the ownership of land, and at this point the colonial project acquired a new ideological tone, exemplified in Lord Macaulay's 1835 edict on Indian education, announcing the replacement of Persian by English as the new language of government and commerce.

You could say this was the moment that English started to become the international means of communication and power.

These interventionist attitudes form the background to the 1857 mutiny - the greatest rising against any colonial power in the Age of Empire, far surpassing in scale the other great revolts in Asia, Africa and the New World.

Image caption Sir James Lancaster was the East India Company’s first director

By now the company depended on huge numbers of local troops, and there were many strands to native discontent. The spark of the revolt was a protest in the native army ranks against British insensitivity to Hindu religion, especially in the alleged use of rifle cartridges greased with cow fat.

But it rapidly spread as a rebellion against foreign rule in which even Muslim jihadists made common cause with Hindus. As rebellion spread like wildfire up and down the Grand Trunk Road from Bengal to the Punjab, the very presence of Britain in India hung in the balance.

The war that followed was conducted with horrific violence and savage reprisals by both sides. Both Hindu and Muslim rebels expressed their loyalty to the ageing Mughal Emperor in Delhi - Bahadur Shah - who after the defeat was exiled to Burma. His sons were killed in cold blood by the British who were shockingly merciless in their revenge.

So the company's extraordinary rise to global power ended in catastrophe both for the shareholders and for the country in which they were operating.

The rising of 1857 was a disaster for India, wrecking Mughal Delhi and its refined cultural life, and bringing devastation on its population, many of whose adult males were summarily massacred.

But the rising was also a terrible shock to the British establishment, as it opened up to public gaze the workings of company rule. In the aftermath, in 1858 the British parliament stepped in to take direct control of its Indian possessions, nationalised the private army of the company and put an end to its 258-year existence in India.

The company left behind a memory of corporate abuse, colonialism, exploitation and monopoly power, but as always there are many sides to any story in history.

When the company was finally dissolved in 1874, the Times's judgement was that "the company had accomplished a work such as in the whole history of the human race no other company ever attempted, and as such is ever likely to attempt in the years to come".

Given the events of the last few weeks, indeed of the last few years, it seems unlikely that G4S, Halliburton or Blackwater will be remembered in quite the same way.