Los Angeles County will pay almost $3 million to the family of a man who was killed in Long Beach by a sheriff’s deputy who mistakenly thought the man had shot him.

The deputy was actually wounded by his own partner before shooting the man three times in the back on the morning of May 26, 2014, according to authorities.

The Los Angeles County Board of Supervisors approved the settlement Tuesday to end a wrongful death lawsuit brought by the mother and children of 23-year-old Noel Aguilar.

The wounded deputy shot Aguilar point-blank while they were on the ground where Aguilar was wrestling away from attempts to handcuff him, according to a description of the arrest prepared by county officials.

The deputies involved, Albert Murad and Jose Ruiz, said they feared Aguilar was trying to grab one of their guns or reaching for his own weapon during the arrest.

A bystander filmed the gunfire and struggle leading up to it.

“This was a particularly gnarly shooting,” one of the plaintiffs’ attorneys, John Burton, said. “One that the DA really should’ve done something on in my opinion.”

The Los Angeles County District Attorney’s Office decided in February 2015 not to file any criminal charges against the deputies, determining instead that they acted in self-defense.

• RELATED: ACLU calls for investigation of sheriff’s shooting death of Long Beach man

Attorney Humberto Guizar, who represented Aguilar’s mother, called the settlement a bittersweet resolution.

“The money is not justice,” he said. The family wanted the deputies to be prosecuted, according to Guizar.

Authorities said Aguilar was wearing headphones and riding his bike on the sidewalk at 69th Way and Long Beach Boulevard, which is near the Compton-Long Beach border, when deputies saw him. As they followed in their patrol car, he began pedaling away faster, according to board documents.

He then ducked into an alley and began running, but deputies quickly tackled Aguilar and began struggling with him on the ground, authorities said.

During the scuffle, Murad grabbed a pistol from under Aguilar’s clothes and tucked it into his own belt, according to attorneys on the case.

The deputy told his partner that Aguilar had the gun but never mentioned he’d now taken it from him, according to the board documents.

Ruiz drew his gun and told Aguilar not to move while the three grappled. But when Aguilar kept struggling and pushed himself off the ground onto his knees, the deputy fired, thinking Aguilar was reaching for a gun, according to authorities’ description.

• RELATED: Deputy shot in Memorial Day incident struck by bullet from partner’s gun

The deputy tried to fire three shots, but his gun jammed after the first round, the board documents said. The shot missed Aguilar, according to authorities.

“Immediately after the gunshot, the (other) deputy screamed, ‘I’ve been shot!’ ” the board documents said.

Deputies said Aguilar then tried to grab the jammed gun away from Ruiz, but Burton said he was only trying to push the gun away from his face.

Aguilar can be heard in the video saying “I didn’t shoot nobody.”

Burton said Ruiz then managed to clear his gun’s jam and fire a shot into Aguilar’s leg.

Immediately after that shot, the video shows Murad drawing his gun and firing three shots into Aguilar’s back.

Based on that footage, Guizar accused Murad of shooting Aguilar out of anger.

“He did it in a very, very calculating way,” he said.

Murad survived his gunshot wound.

• VIDEO: Video shows deputy-involved shooting

Authorities said Aguilar was a known gang member with convictions for crimes including grand theft auto, felony reckless driving and evading arrest, and drug possession.

Guizar said he’s been legally barred from discussing past conduct of the deputies, including any possible discipline. However, he said, Aguilar’s history is on full display.

“That’s what we call a system that’s rigged,” Guizar said.

California law shields police officers’ personnel records from public access in most situations.

The sheriff’s department conducted an internal investigation of Murad and Ruiz after the shooting, but the results were not disclosed.

The report to county supervisors lists multiple mistakes from Murad and Ruiz during the arrest including not properly communicating with each other, leading to the deadly situation.

It also lays responsibility with Aguilar, saying he resisted deputies and made them fear for their lives when he tried to grab the gun.

Reporter Susan Abram contributed to this report.