Image copyright Getty Images Image caption Navinder Sarao in London in 2016

The self-taught UK trader who made millions in bogus trades and contributed to a brief 2010 crash in the US stock market has been sentenced to a year of home confinement.

Navinder Sarao, who pleaded guilty in 2016 to fraud and market "spoofing", faced up to eight years in prison.

But US prosecutors had recommended against jail time.

They said the judge should consider his "extraordinary cooperation" with the government and diagnosis with autism.

In federal court in Chicago, Judge Virginia Kendall sentenced Mr Sarao to one year of supervised release with strict conditions, which limit his activities outside the home, according to a Bloomberg reporter who was in the courtroom.

"I hope that this is a lesson to you," she reportedly said.

When the judge proposed a year of home incarceration initially, she was told that sentence might not be enforceable outside of the US.

Mr Sarao already spent four months in the UK's Wandsworth Prison after his 2015 arrest. He has also forfeited about $7.6m (£5.8m) in illegal gains.

Media playback is unsupported on your device Media caption 'We're incredibly grateful', says Navinder Singh Sarao's lawyer

"We're incredibly grateful," Mr Sarao's attorney Roger Burlingame told the BBC. "He's...looking forward to getting back to living his life."

Mr Burlingame added that Mr Sarao was "overjoyed" to put the matter behind him, after "living under threat of a very long sentence" for almost five years.

'Spoofing the market'

US authorities say Mr Sarao made more than $70m between 2009 and 2014 trading from his childhood bedroom, including $12.8m tied to his illegal behaviour.

Using specially programmed, high-speed software, Mr Sarao placed thousands of orders that he did not intend to fulfil, creating the illusion of market demand. When he cancelled or changed his bids, he was able to profit.

Analysis by BBC Business reporter Ramzan Karmali

Navinder Sarao will be extremely relieved not be spending another day behind bars. His attorney, Roger Burlingame, told me that the four months Mr Sarao spent at Wandsworth prison were probably the toughest thing he'd ever faced.

Mr Sarao has a diagnosis of severe Asperger's - one of many interesting aspects to this case.

Mr Burlingame said that Mr Sarao almost believed he was playing a highly sophisticated and complicated video game and he affectively found the best "cheat" to win the game. He had alerted authorities about what he believed - that many traders were cheating on the futures markets - six months before he was arrested. He claims the authorities weren't interested in his findings.

The other aspect which many people find hard to believe is that Mr Sarao has no money left from his trading profits. He lost a large amount to fraudsters himself but Mr Burlingame said his motivation was never money but the thrill of winning at his favourite video game.

The activity - known as "spoofing" - contributed to market instability that led to the May 2010 "flash crash", when the Dow Jones index fell almost 1,000 points in a matter of minutes.

The US made spoofing a crime in 2010 as part of a broader effort to tighten regulations following the 2008 financial crisis. Mr Sarao was the second person to be charged under the new rules.

Mr Burlingame said Judge Kendall had considered Mr Sarao's crimes in the "proper context", which had included complaining to market officials about spoofing by other traders.

Mr Sarao saw his trades as a way to "fight fire with fire", Mr Burlingame added.

The case against Mr Sarao, filed in federal court in Chicago, drew intense interest in the UK, where he was dubbed the "Hound of Hounslow" in reference to the "Wolf of Wall Street" and location of his parents' home in West London.

Image copyright Getty Images Image caption Hounslow in west London, from where US authorities allege Navinder Sarao caused the market to crash

He faced hundreds of years in prison on the initial charges, which were reduced in the 2016 plea deal.

In court documents, Mr Sarao's attorneys described him as a mathematical savant and "singularly sunny, childlike, guileless, trusting person", who lived off public benefits and spent much of his time in his childhood bedroom, surrounded by computer games and stuffed animals.

He spent little of his profits, much of which he lost in investment scams.

In their sentencing recommendation, prosecutors noted Mr Sarao's medical diagnosis, expressions of his remorse and assistance with other lawsuits.

They said jail time would not serve as a deterrent, arguing that he had been motivated not by greed, but by a desire to excel in an activity he perceived as a "sophisticated video game".