Dan Cowhig, prosecuting, told the federal court Hutchins should not be freed because he is a "danger to the public".

"He admitted he was the author of the code of Kronos malware and indicated he sold it," Mr Cowhig said.

Hutchins and his unnamed co-defendant, who is still at large, were caught in a sting operation when undercover officers brought the code, the prosecutor added.

Other evidence comes from chat logs between him and a co-defendant during which Hutchins complains about the money he received for the sale, Mr Cowhig said.

View more!

After the hearing, Hutchins' lawyer Adrian Lobo denied he is the author and said he would be pleading not guilty to all of the charges, which date between July 2014 and July 2015.

She said: "He fights the charges and we intend to fight the case.

"He has dedicated his life to researching malware, not trying to harm people. Use the internet for good is what he has done."

Hutchins spoke softly as he answered procedural questions and confirmed his identity while wearing a prison-issued yellow jumpsuit with "detainee" stamped on the back, and bright orange Crocs shoes.

District judge Nancy Koppe ordered his release on bail considering he has no criminal history and because the allegations date back to two years ago.

Marcus Hutchins credit: Frank Augstein/AP

He cannot access the internet, must be monitored by GPS, surrender his passport and only reside in Clark County, Nevada, and within the Eastern District of Wisconsin where he will appear in court on Tuesday.

At that hearing he is expected to formally enter his pleas.

Hutchins, also known as MalwareTech, was indicted alongside an unidentified co-defendant by a grand jury over allegations unrelated to his work halting the attack by the WannaCry ransomware that hit more than 300,000 computers in 150 countries.

The indictment claims Hutchins created the malware that can side-step anti-virus software to steal banking usernames and passwords before conspiring with the co-defendant to sell it on internet forums.

Prosecutors claim the co-defendant successfully sold the software for 2,000 dollars (£1,522) in digital currency in June 2015.

Janet Hutchins, the researcher's mother, has said it is "hugely unlikely" he is involved because he has dedicated "enormous amounts of time and even his free time" combating such software.

The FBI arrested on Hutchins at McCarran International Airport where he was trying to fly back to Briton from the Def Con hacking conference, a friend said.

Hutchins, who works for Los Angeles-based computer security firm Kryptos Logic, was expected to be released later on Friday.