The parents of a Compton teen fatally shot by a Los Angeles County Sheriff’s deputy are expected to get half a million dollars in a settlement that comes on the heels of a dramatic mistrial earlier this year, according to sources close to the case.

In March, a judge abruptly ended the wrongful death case of Avery Cody Jr. after the attorney for the slain 16-year-old’s family announced in court that he had a videotape that he said contradicted sworn statements made by the deputy.

The video, according to the attorney, showed Deputy Sergio Reyes touching Cody’s body after he shot the youth, even though Reyes said in sworn statements that he never touched the body. The surprise evidence was the second instance in which the deputy’s account of the 2009 shooting and its aftermath appeared to be contradicted by video evidence.

The other was the deputy’s statement that he took cover behind a metal newspaper rack; it was refuted by surveillance video from a nearby doughnut shop. Attorneys said Reyes made the statement to exaggerate the danger the deputy felt he was in when he shot Cody.

The tentative settlement must be approved by the Board of Supervisors. The six-figure amount has not been made public yet, but individuals with knowledge of the case said it was $500,000.

Sheriff’s officials say Cody was armed and pointed a .38-caliber revolver at the deputy. The teen was walking back from lunch at a fast-food restaurant with three friends in July 2009 when two deputies stopped the group. Cody and another boy bolted.

Sheriff’s officials say Cody turned mid-sprint and pointed his gun at Reyes before the deputy shot. Though a revolver was recovered at the scene, attorneys for Cody’s family said in court that the gun didn’t belong to Cody, hinting that it was planted.

Witnesses in the civil case have testified that they didn’t see Cody holding a gun but say he may have been holding a cellphone. Sheriff’s officials say they interviewed witnesses who did see Cody with a gun, but the department has declined to name those individuals.

Sheriff’s spokesman Steve Whitmore said the tentative settlement “doesn’t in any way demonstrate any malfeasance on the part of the department.”

Reyes, still an active patrol deputy, was found to be in line with department policy, Whitmore said. Reyes’ attorneys have said false memories don’t indicate any intentional attempt to mislead but are common among law enforcement officers involved in high-pressure shootings.

After the Cody family’s attorneys surprised the defense with footage they said showed Reyes touching the teen’s body, the Sheriff’s Department’s watchdog agency announced that it would take a second look at the case. The Office of Independent Review had previously endorsed an internal Sheriff’s Department investigation that concluded the shooting was within policy. The agency’s head, Michael Gennaco, said no progress had been made yet in the review because he wanted to avoid disrupting the ongoing civil litigation.

A copy of the video obtained by The Times showed a deputy, who cannot be definitively identified as Reyes but has a similar frame and skin tone, standing over Cody’s body. The deputy in the grainy footage, taken by a passerby, appears to briefly bend down twice to touch the body, but it’s unclear whether he made contact or what exactly he was doing.

Attorneys for the teen’s family say the reason gunpowder residue was detected on the teen’s hands was because Reyes rubbed them to make it appear that Cody had been armed.

John Sweeney, the Codys’ attorney, said the videos that surfaced of the shooting and its aftermath were key to his case. “It’s extremely rare to have that kind of footage,” he said.