After months of legal battles a federal judge has ordered a California city to release video from police dashcams showing officers fatally shooting an unarmed man in the Los Angeles suburbs after mistaking him and two others for robbery suspects.

The city of Gardena paid out $4.7 million to settle a federal lawsuit with the family of the deceased and his brother, who was injured during confrontation with police. Authorities have been struggling to keep the dramatic video private, however.

Early morning of June 2, 2013, Ricardo Diaz-Zeferino was stopped by police investigating a bicycle theft. The 34-year-old was trying to help his brother find his stolen bike when he was rounded up as a suspect instead. Witnesses said Zeferino attempted to tell officers that two other bicycle-riding friends they had stopped were the wrong men.

Police stated that Diaz-Zeferino approached the officers and was shot after repeatedly ignoring police orders. Officials said law enforcement officers fired in fear that he had a weapon, because the suspect was allegedly moving in such a way they could not see his right hand.

According to the Los Angeles Times, the prosecutor who reviewed the shooting, Deputy District Attorney Rosa Alarcon, concluded in her memo that Diaz-Zeferino showed a complete disregard for the officers' orders, noting that an autopsy found he had methamphetamine as well as high levels of alcohol in his system.

The newly-released video shows how Diaz-Zeferino was shot dead after he failed to obey police commands to put his hands up.

“The videos show the cold-blooded shooting of clearly unarmed men,” an attorney for some of the men, R. Samuel Paz, told the LA Times.

READ MORE: Obama calls for criminal justice reform in system ‘skewed by race and wealth’

According to Paz, a police dispatcher “mistakenly” told officers heading to the area in search of two suspects that the crime was a robbery - which oftentimes involves use of weapons in the US. The lawyer who sued the city on behalf of the deceased says the videos show that “Diaz Zeferino's right hand was clearly empty and in front of his body when the shots were fired.” He also told the paper the videos demonstrate “officers were giving confusing orders” and that one of the injured men “was shot despite keeping his hands above his head.”

Civil rights attorney Sonia Mercado of Culver City, who represented the Diaz-Zeferino estate and others in the civil lawsuit, has praised the Tuesday ruling finally making the video public.

“The reason the video is important is to show this human being had his hands up and was merely trying to explain to the officers that his two friends were not bike thieves,” Mercado said.

Philadelphia cops caught beating, kicking black man as he screams for help (VIDEO) http://t.co/jLRBvJWTKwpic.twitter.com/ZBv6mOvJ3H — RT (@RT_com) July 10, 2015

"The fact that they spent the city's money, presumably derived from taxes, only strengthens the public's interest in seeing the videos," Judge Stephen V. Wilson wrote in his 13-page decision cutting short efforts by city attorneys arguing that Gardena had paid the settlement money hoping the videos would remain private.

"Moreover, defendants cannot assert a valid compelling interest in sealing the videos to cover up any wrongdoing on their part or to shield themselves from embarrassment," the judge stated.

Gardena immediately filed a notice with the 9th US circuit court of appeals, seeking to block the video’s release. Several hours later, Judge Alex Kozinski issued the order that “the police car camera video footage shall remain under seal pending further order of this court.” By then, the Los Angeles Times had already published the video.