A federal judge ordered a suburban city in Los Angeles, California to release police video that shows officers fatally shooting an unarmed Latino in 2013.

On Tuesday, Judge Stephen V. Wilson ruled the public should be able to see the shooting, which was recorded by police dashcams, following the city of Gardena's decision to offer the victim's family $4.7 million in a lawsuit settlement.

"The fact that they spent the city's money, presumably derived from taxes, only strengthens the public's interest in seeing the videos," Wilson wrote in his 13-page decision. "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 order, however, was stayed by a federal appeals court later that day, hours after the court had released what Wilson described as "potentially upsetting and disturbing" videos.

The video shows Gardena police fatally shooting 35-year-old Ricardo Diaz-Zeferino, who was looking for his brother's stolen bicycle with two friends on June 2, 2013. His brother called 911 to report the theft, however, police mistook the three men as robbery suspects when they saw them with the bike.

In the video, the officers can be heard yelling at Diaz-Zeferino to keep his hands up as he moves his arms up and down. He is also seen moving forward and backward as the officers tell him to stand still. Meanwhile, the two other men remain motionless.

The cops then opened fired when Diaz-Zeferino removed his hat from his head, striking the unarmed man eight times. One of his friends was also shot and wounded.

The district attorney found the shooting to be justifiable, and the three officers were not charged.

Gardena officials wanted the video kept private due to "serious privacy concerns as it relates to the release of police videos in general," Police Chief Ed Medrano said in a statement released late on Tuesday.

"We worry about the implications of this decision, and its impact on victims and average citizens who are recorded by the police," the statement read.

However, a lawyer representing The Associated Press, the Los Angeles Times and Bloomberg pressed the judge to unseal the videos under a First Amendment right to access court documents. They argued the videos should be made public in wake of national debate over police brutality following a string of fatal shootings of unarmed black and Latino men.

"We applaud the court's decision to unseal the video," AP spokesman Paul Colford said. "The Associated Press, joining with other news organizations, believes it's important that the public has access to videos like this to better understand the actions of their police officers."

Autopsy records found Diaz-Zeferino was intoxicated at the time of his death, and tests came back positive for methamphetamine.

Sonia Mercado, a civil rights attorney who represented Diaz-Zeferino's family and others in the civil lawsuit, applauded Tuesday's ruling.

"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, reports NBC News"I think it's important for Americans to see what really went on. My clients were not lying when they said they had their hands up."

Watch the police shooting below.