The city of San Francisco on Tuesday reached a financial settlement of an undisclosed amount with the mother of a man fatally shot by five police officers in the city's Bayview District in 2015.

Mario Woods, 26, died of 20 gunshot wounds fired by the officers on the afternoon of Dec. 2, 2015. At the time, he was a suspect in an earlier stabbing and was carrying a knife.

He refused to drop the knife, but a lawsuit filed in federal court by his mother, Gwendolyn Woods, contends he never threatened the officers or lifted the knife before he was shot.

The settlement came six days before a jury trial was scheduled to begin on April 1 in the court of U.S. District Judge William Orrick in San Francisco.

The financial amount will be confidential for 30 days and must be approved by the city's Police Commission and Board of Supervisors, according to Andrea Guzman, a spokeswoman for city Attorney Dennis Herrera.

A federal judge says video of a racially charged, fatal San Francisco police shooting “casts doubt” on officers’ accounts that a 26-year-old black man was moving quickly toward them when they shot.

In a pretrial ruling in October, Orrick dismissed some federal constitutional claims by Gwendolyn Woods, but said the case could go to trial on state law claims of use of excessive force and negligence.

Orrick said videos show that Woods had not brandished the knife or made verbal threats. He said a jury should decide whether the officers acted recklessly, or whether they acted reasonably because of fear for their safety and bystanders' safety.

In another pretrial ruling on March 14, Orrick said the mother's lawyers could use as evidence a video in which a bystander is heard shouting "That was unnecessary." The judge said the city could use evidence that Mario Woods had drugs in his system when he died.

The mother's lawyer, John Burris, was not immediately available for comment.

John Cote, a spokesman for Herrera, said in a statement, "Any loss of life is tragic, and our condolences go out to the loved ones affected here.

"Police officers are often forced into difficult situations and have to make split-second decisions in dangerous and evolving circumstances.

In this case, the officers' response to a risky situation was consistent with their training and in accordance with the law.

"This settlement allows us to reach a resolution without the need for a trial," Cote said.