Robert Bennett, a lawyer for the Castile family, said that “no amount of money can ever replace Philando,” but that the settlement should provide some measure of comfort to those angered by his death.

“I think this is a way of stopping what could be several years of litigation traveling through the courts and exacerbating the suffering of the family and the community,” Mr. Bennett said. “And perhaps both can do now the important business of trying to heal.”

The payout comes at a time of heightened scrutiny of the criminal justice system’s handling of police shootings. Officer Yanez was one of four police officers to go on trial for a fatal shooting of a black person in recent weeks. All of the shootings were captured on video. Juries acquitted three of the officers and failed to reach a verdict in the fourth case.

Mr. Castile’s death inspired protests and outrage starting minutes after he was shot last July 6 on a busy suburban road near the Minnesota state fairgrounds. Diamond Reynolds, Mr. Castile’s girlfriend, streamed the graphic aftermath of the shooting on Facebook and said her boyfriend had been trying to cooperate with Officer Yanez, who had pulled him over for a broken taillight.