Montgomery County will pay $2 million to the family of a Wheaton man who was accidentally shot to death by a police officer outside a McDonald's restaurant in April, one of the largest amounts the county has paid to settle a police action.

Under a civil settlement reached yesterday in Montgomery County Circuit Court, the county also agreed to spend an additional $1 million to promote "better gender and racial harmony and respect" between the police department and the public.

That money will be used to mount video cameras in some Montgomery police cars to record interactions between officers and civilians, and to fund programs to increase police sensitivity training and recruit minority officers, according to the agreement.

A Montgomery County grand jury in April cleared Officer Sean Thielke, 30, of criminal wrongdoing in the death of Junious W. Roberts, 44, at a McDonald's on Georgia Avenue in the Glenmont area. Thielke told the grand jury that he approached Roberts's car with his gun drawn because Roberts had fled when he stopped him earlier and he believed Roberts was drunk and might drive off and kill someone, Thielke's attorney said.

Thielke said his gun discharged accidentally as he tried to pull Roberts from the car, striking Roberts in the back. Thielke, an officer for six years, returned to uniformed street patrol in the Wheaton police district in early May.

Critics said the fatal shooting April 14 -- the second of a black person by a white Montgomery officer during a three-week period -- illustrated the department's unfair treatment of minorities.

"I'm very pleased the Roberts family will be getting compensation in the wake of a very tragic accident that resulted in the loss of a life," said Montgomery County Executive Douglas M. Duncan (D) at a news conference after a 20-minute hearing before Circuit Court Judge James C. Chapin.

Duncan said he hoped the settlement "will bring closure" to the Roberts family, to Thielke and his family and to "the entire community."

"There's no happiness in this matter for the family or the police department," added Charles A. Moose, the new Montgomery police chief. "This was indeed a tragedy. I know this doesn't bring a human being back . . . but we will use this [financial agreement] to improve and seek continuous improvement."

Moose said former acting police chief Thomas Evans disciplined Thielke after finding that he violated department policy in the shooting. Moose said Maryland law prohibited him from giving details.

Of the $2 million allotted for Roberts's family, $1.1 million will be split among Roberts's widow, Carolyn S. Roberts, and their sons, Junious A. Roberts, 19, Anthony Roberts, 17, and Ivan Roberts, 15. An additional $666,700 will go to their three attorneys; $25,300 will pay their attorneys' expenses; and $200,000 will go to pay Junious W. Roberts's funeral costs and medical expenses and to compensate his estate for his pain and suffering.

"I think it's fair," said Los Angeles lawyer Johnnie Cochran, who represented the family with Prince George's lawyer Walter L. Blair and Baltimore lawyer Billy Martin. "I haven't seen another county step up to the plate like this. It's not always just about money. It's about trying to make some fundamental changes so these things won't happen anymore."

Roberts's family members filed "friendly lawsuits" against Thielke and the county yesterday, an indication that an agreement had been reached before the suits were formally filed. Chapin said he approved the settlement because the court had a legal duty to safeguard the interests of the minor children.

"This is some closure, but I'm not happy," Roberts's sister, Valencia Roberts, said tearfully. The family declined to comment further yesterday.

Under the settlement, the county agreed to pay an additional $28,000 to the dead man's son Junious A. Roberts, his wife, his son and two friends who were in a car that Montgomery police pulled over in a separate incident May 5. Junious A. Roberts alleged that police targeted them and treated them unfairly during the stop.

Joann Robertson, chief of litigation for the county attorney's office, said the officers stopped the car because Junious A. Roberts fit the description of a suspect wanted in connection with stolen checks. She said the police admitted no wrongdoing in that incident but wanted to "get it off the table."

Robertson and police officials said it was the first settlement of a police action to exceed $1 million since the county paid $1 million to settle a civil suit 20 years ago.