MINNEAPOLIS — The mother of Philando Castile, a black motorist killed by a Minnesota police officer last year, has reached a nearly $3 million settlement in his death, according to an announcement Monday by her attorneys and the Minneapolis suburb that employed the officer.

The settlement to be paid to Valerie Castile will avoid a federal wrongful death lawsuit stemming from Philando Castile's death. The 32-year-old elementary school cafeteria worker was killed by St. Anthony officer Jeronimo Yanez during a traffic stop July 6 after Castile told the officer he was armed. Castile had a permit for his gun.

The shooting gained widespread attention after Castile's girlfriend, who was in the car with her then-4-year-old daughter, livestreamed its gruesome aftermath on Facebook.

Yanez, who is Latino, was acquitted of manslaughter and other charges earlier this month. The jury's decision prompted days of protests, including one in St. Paul that shut down Interstate 94 for hours and ended with 18 arrests.

Related: Girl Pleads With Mother After Castile Shooting: 'I Don't Want You to Get Shooted!'

The $2.995 million settlement will be paid by the League of Minnesota Cities Insurance Trust, which holds the insurance policy for the city of St. Anthony. It requires approval by a state court, which could take several weeks.

Robert Bennett, an attorney for Valerie Castile, said the idea behind the settlement was to move expeditiously rather than have the case drawn out in federal court, a process that would "exacerbate and reopen terrible wounds." The settlement will also allow the family, the city and community to work toward healing, Bennett said.

Bennett said it also will allow Valerie Castile to do the work she plans through the Philando Castile Relief Foundation. A Facebook page for the nonprofit foundation says it was established to help victims of gun violence and to provide relief for the grieving.

Valerie Castile, mother of Philando Castile, gestures as she speaks about her reaction to a not guilty verdict for Officer Jeronimo Yanez at the Ramsey County Courthouse on June 16, 2017 in St. Paul. Renee Jones Schneider / Star Tribune via AP

During his trial, Yanez, 29, testified that Castile ignored his commands not to pull out his gun. The officer said he feared for his life. According to squad-car video that captured the shooting, Castile said: "I'm not pulling it out" before Yanez fired seven rapid shots. Castile's last words after the shooting were "I wasn't reaching ..."

Related: Ray Tensing Trial: Mistrial Declared for Second Time

Castile's girlfriend, Diamond Reynolds, later said Castile was reaching for his wallet.

The squad-car video shows the shooting, but does not show what happened inside the car or what Yanez saw, leaving room for reasonable doubt.

After Yanez's acquittal, the city of St. Anthony said it was offering Yanez a "voluntary separation agreement" from the police department, and he would no longer be an on-duty officer. The department serves the cities of St. Anthony, Lauderdale and Falcon Heights, where the shooting occurred.