Image copyright Reuters Image caption GCHQ, a British intelligence agency, wholly denies it helped wiretap Donald Trump

The claim that GCHQ carried out surveillance on Donald Trump during the election campaign is "arrant nonsense", Rick Ledgett, the number two at the US National Security Agency (NSA) has told the BBC in an exclusive interview.

A commentator on Fox News had claimed that GCHQ had carried out the activity on America's behalf, but Mr Ledgett said the claim showed "a complete lack of understanding in how the relationship works".

Each side, he said, was prohibited from asking the other partner to carry out acts that they were prohibited from doing.

He also said the huge risks to the UK in carrying out such an act would completely outweigh any benefits.

"Of course they wouldn't do it. It would be epically stupid," he told me.

GCHQ had also dismissed the allegation as nonsense.

Mr Ledgett's comments came in a wide-ranging - and long-scheduled - interview in his office at NSA headquarters at Fort Meade. He acknowledged that these were unusual times when it came to the political maelstrom surrounding America's intelligence agencies and their relationship with the new administration.

"Our job in the intelligence community is to be apolitical. Our job is to speak truth to power," he emphasised.

The origins of much of the tension lie in the assessment by the US intelligence community that Russia interfered in the presidential election, and the subsequent reaction from Donald Trump.

Mr Ledgett said the evidence of Russian involvement was "extraordinarily strong" and "irrefutable" and that the NSA had played a key role in establishing the case.

Mr Ledgett said he was "dead solid 100% confident" that the Russian state was behind the attempts - although he said it was not for the intelligence community to evaluate the actual impact of those attempts on the vote itself.

Image copyright AP Image caption President Vladimir Putin insists that Russia did not interfere in the US election

There has been speculation that Russia will interfere in upcoming European elections, but the NSA deputy director said it was hard for him to talk about any evidence supporting that.

There has been a shift towards more aggressive action in cyberspace in recent years - from Russia but also other states - with some commentators claiming that "cyber war" is breaking out.

Low-intensity conflict rather than war is a better description, Mr Ledgett said.

"Cyber war is going to look very different - you are going to see massive failures of key infrastructure systems in the countries that are being targeted in a way we have not seen yet."

The problems in attributing attacks and the lower barriers for entry mean that this trend may well continue, though.

The US last week indicted a group of Russian hackers as part of a broader strategy of trying to develop layered deterrence. Chinese and Iranian hackers have been indicted in the past.

"Our assessment is that it does cause actors to pause," Mr Ledgett said, while acknowledging it did not provide absolute deterrence.

The spread of internet-connected devices in the home is another concern.

"It's a truism that the more things you connect to a network, the more vulnerabilities you introduce," Mr Ledgett argued, adding that he did not have what are called "Internet of Things" devices in his own home.

Last week there were claims that the CIA - along with Britain's MI5 - had found vulnerabilities in some "smart" TV sets which allowed them to be turned into bugging devices.

Image copyright Getty Images Image caption It has been claimed that the CIA devised a spyware attack for Samsung TVs

Mr Ledgett emphasised that the mission of the NSA was to focus on foreign intelligence and not domestic.

He said that 90% of vulnerabilities in systems that the NSA spotted were reported to companies so they could fix them. And any vulnerabilities that the agency sought to leave in place to exploit for intelligence gathering needed to be approved by other government agencies.

"There's a fringe narrative out there that the US and UK and all these other governments are willy-nilly just exploiting every vulnerability in every device they can in order to gather information into a big pile and then root through it for interesting things. That's not what we do at all."

He acknowledged that the debate around the NSA's power was healthy, but said the way it came about was bad, referring to the Edward Snowden revelations.

He said that while he would not point to specific terrorist attacks or deaths as a result of disclosures, the NSA had seen one thousand "entities" (such as terrorist groups or foreign military units) which had tried to change behaviour to avoid surveillance.

Image copyright Reuters Image caption Mr Ledgett spoke to the BBC at the NSA's headquarters in Fort Meade

Mr Ledgett is due to step down in the coming months after a 40-year career in national security. Twenty-nine of those years were spent at the NSA, where he ended up as its most senior civilian.

He acknowledged that the current environment - with the intelligence agencies drawn into political debate - was unprecedented.

"It is an uncomfortable place to be," he said. "Intelligence needs to not be politicised to be at its best."