US District Judge JP Stadtmueller sentenced 25-year-old Marcus Hutchins to time served, with a year of supervised release. Sitting in Milwaukee, Judge Stadtmueller said the virus Hutchins helped stop was far more damaging than the malware he wrote. Hutchins pleaded guilty in May to developing and conspiring to distribute malware called Kronos from 2012 to 2015. Prosecutors dismissed eight charges in exchange for his plea. Hutchins' arrest in Las Vegas in 2017 came as a shock. Just months earlier he was hailed as a hero for finding a 'kill switch' to the WannaCry virus that crippled computers worldwide. He had faced up to 10 years in prison, but prosecutors had credited Hutchins with taking responsibility for his actions. Hutchins served just a few days in jail before being freed on bail, but had to remain in the US while his case was pending. Hutchins spoke briefly on Friday, apologising to his victims. He said: "I deeply regret my conduct and the crimes I was involved in." His attorney said afterwards he intended to return to the UK. Hutchins no longer develops malware attacks and works to stop them, but that does not diminish the seriousness of what he did, prosecutors said. While his case was pending, prosecutors barred Hutchins from returning home, so he worked as a cybersecurity consultant in California. "Like a man who spent years robbing banks, and then one day came to realise that was wrong, and even worked to design better security systems, he deserves credit for his epiphany. But he still bears responsibility for what he did," prosecutors said. Hutchins was indicted on 10 charges for developing two pieces of malware and lying to the FBI. Prosecutors said Hutchins conspired to distribute the malware - UPAS Kit and Kronos - from 2012 to 2015 and that he sold Kronos to someone in Wisconsin. He also 'personally delivered' the software to someone in California, prosecutors said. Hutchins initially pleaded not guilty to all charges and was scheduled to go on trial this month. As part of the deal, Hutchins pleaded guilty to two charges for creating Kronos - and an updated version of UPAS - and conspiring to distribute it. In exchange, prosecutors dismissed the other eight charges. "As you may be aware, I've pleaded guilty to two charges related to writing malware in the years prior to my career in security," Hutchins said in a statement on his website after the plea deal was announced. "I regret these actions and accept full responsibility for my mistakes. Having grown up, I've since been using the same skills that I misused several years ago for constructive purposes. I will continue to devote my time to keeping people safe from malware attacks."