His attack took place in June 2014 and he made anonymous postings of screenshots taken of the dashboard used to control the database, boasting “We’re in your bases, we control your satellites”.

But he was tracked down and arrested nine months later after detectives from the UK’s National Crime Agency traced the attack to his internet connection.

Detectives then found the stolen data on his hard drives and found an online messaging account linked to the attack had been opened and operated under a pseudonym from Caffrey’s computer.

At the time, officials insisted that no classified data had been stolen, but the Pentagon estimated the damage from the attack cost nearly £500,000 to repair.

Caffrey on Thursday pleaded guilty at Birmingham Crown Court to an offence under the Computer Misuse Act.

Janey Young, investigations managers at the NCA, said there had been “very clear, very compelling evidence against Sean Caffrey”.