British and American “cyber-agents” are to join forces to protect the UK’s biggest banks, as well as transport systems and energy supplies, from potentially crippling online terrorist attack.

The pioneering deal will be signed today by David Cameron and President Barack Obama in talks at the White House which will focus on combating terrorism and boosting the two nations’ economic growth.

The red carpet was rolled out for David Cameron as he was afforded the rare honour of staying tonight in White House guest accommodation usually reserved for heads of state.

His flying visit is Mr Cameron’s final scheduled trip to the United States before the general election. Although serious global issues are on the agenda, his aides hope that pictures of the two men side by side will burnish the Tory leader’s leadership credentials.The joint cyber-crime agreement comes ahead of the publication today of a GCHQ report spelling out the dangers to British businesses of cyber-crime, disclosing that more than 80 per cent of large companies in the UK suffered some form of hacking last year. In the worst cases, it cost the firms some £1.5m.

The first of a series of joint UK-US “war games” will simulate online attacks on the City of London and Wall Street in moves to assess the quality of the large financial institutions’ defences against malicious hacking designed to paralyse their operations.

It will involve UK and US intelligence agencies as well as organisations such as the Bank of England and several large commercial banks.

The “war game” will be followed by further exercises to test critical national infrastructure in the two countries, such as the computer systems controlling power supplies and the road and rail networks.

Britain and the US are also to establish a joint “cyber cell” on each side of the Atlantic where intelligence agents will work together to share information about threats and respond to any attempted attack.

The first time the UK has established such an operation overseas, it will bring together MI5 and GCHQ with their counterparts in the National Security Agency and the FBI.

Sony Cyber Attack: The Worst Affected In Hollywood

In other moves, the governments will pool resources to train young computer experts as “cyber-agents” and share the latest security advice to the multinational firms which could be targeted by online terrorists.

The potential dangers of “cyber-crime” were illustrated this week when the Twitter and YouTube accounts of the US military command were briefly hijacked by a group claiming to back Islamic State.

Last month Sony Pictures suffered severe embarrassment when its computer system hacked in an attack blamed on North Korea.

Mr Cameron said last night: “Just as we have worked with our closest ally, the US, to protect our people and our countries from traditional threats, so we must work together to defend ourselves from new threats like cyber attacks.

“This is an evolving threat which poses a real risk to our businesses and that’s why we’re taking our cooperation with the US to an unprecedented level.”

The moves emerged as Mr Cameron prepared to urge the US government to force US-based companies such as Facebook and Twitter to take stronger action against terrorists communicating via social media.