The WannaCry "hero" facing trial in the US accused of creating a separate malware was coerced into an alleged confession while intoxicated and sleep-deprived, his lawyers have claimed.

Marcus Hutchins, 23, was arrested at a Las Vegas airport as he prepared to fly back home to Ilfracombe, Devon, after attending a hacking convention.

Prosecutors claimed the cybersecurity researcher admitted during interrogation that he created and sold the Kronos malware, which harvests bank details.

But his lawyers argued in a document filed in court in on Friday that he had likely been subject to surveillance leading up to his arrest in August and therefore agents "knew he was exhausted and intoxicated at the time".

Hutchins is credited with stopping the WannaCry attack credit: Chris Ratcliffe/Bloomberg

"The defence intends to argue that the government coerced Mr Hutchins, who was sleep-deprived and intoxicated, to talk," they added.

"As such, his decision to speak with the agents was not knowing, intelligent, and made in full awareness of the nature of the right given up and the consequences of giving up that right, as the law requires."

The legal team also argued that if he was not read his rights he may have wrongly believed his silence could be used against him, as it could be in the UK's legal system.

Hutchins has pleaded not guilty to all the charges against him and last month Tom Bossert, Donald Trump's homeland security adviser, praised him for finding the "kill-switch" that scuppered the WannaCry attack that crippled the NHS and spread to 150 countries in May.

Blame for the malware has been levelled at North Korea by both the UK and the US.

Hutchins, who is currently on bail in Los Angeles where has worked for a computer security firm, denied six counts of creating and distributing the banking trojan between July 2014 and July 2015.

A date for his trial in Wisconsin has not been set.