A hacker calling himself His Royal Gingerness has admitted two cyber-attacks on the websites of an airport and a hospital.

Daniel Devereux, 30, of no fixed address, targeted the websites of Norwich International Airport and the Norfolk and Norwich University Hospital.

Devereux, who has short ginger hair and wore glasses and a black coat, pleaded guilty to two counts of unauthorised access under the Computer Misuse Act when he appeared at Norwich Magistrates' Court on Thursday.

Ian Devine, prosecuting, said the hospital hack did not impact on clinical procedures, but resulted in its website being taken offline for 24 hours as a precaution while security was improved.

The airport took its website down for three days and a new website was built, costing the airport an estimated £30,000 to £40,000 in loss of income and other expenses.

Both the airport and hospital had received emails from Devereux signed 'His Royal Gingerness' stating he had hacked their websites with ease.

In both cases, a person calling himself 'His Royal Gingerness' posted videos to YouTube explaining how to gain unauthorised access to the websites.

Devereux even called local radio station BBC Radio Norfolk and was interviewed about the attacks anonymously, Mr Devine said.

Devereux had bragged that it took him two to three minutes to achieve each hack, and that a friend called 'Muslim Electronic Army' could 'have fun with this at Christmas' as he could put an emergency message on the airport website 'for example saying there was a bomb at the airport'.

Police traced both hacks to the same IP address, and Devereux was arrested.

Mark Davis, mitigating, said Devereux was a so-called 'white hat hacker' who wanted to highlight security vulnerabilities so they could be rectified.

'The hacks he perpetrated were for the improvement and benefit of these systems rather than for malicious intent and personal gain,' he said.

Sentencing was adjourned until June 16 while reports were prepared about the defendant's mental health.

The airport hack happened in September 2015 and the hospital hack was in November 2015.

Devereux is already serving a prison sentence for a separate matter.