A Frederick County grand jury ruled yesterday that two city police officers who shot and killed a Latino youth carrying a BB gun last month acted in self-defense, the state's attorney said at a news conference.

Officers Michael Weaver and James Martin, both in plain clothes, had witnessed Dany W. Rosales in a fight with another man on Dahlia Drive when they jumped out of their car and shouted that they were police officers, Frederick County State's Attorney Scott L. Rolle said. Rosales ran from them and then turned and pointed at the officers what they believed to be a firearm, Rolle said.

The officers drew their weapons and fired three shots, hitting Rosales twice -- once in the left armpit and once in the left side of the head, behind the ear, the prosecutor said. Rosales, who had turned 18 that day, died at the scene. His weapon was a pellet gun made to look like a Walther PPK semiautomatic pistol.

After a 31/2-hour session, the grand jury decided that "it was a justifiable homicide. It was self-defense, and it was a proper use of police force," Rolle said. "They very clearly sent the message that the police officers acted appropriately in this case."

The case has riveted Frederick residents, partly because it drew attention to the growing diversity of the city, where the Hispanic population has tripled from 847 residents in 1990 to more than 2,500 in 2000, census figures show. In the days immediately after the Sept. 30 shooting, rumors circulated in the city's Latino community that the police had shot Rosales in the back without provocation; other Frederick residents speculated that Rosales was in a gang.

Neither rumor was true, Rolle said. The forensic evidence bore out the officers' story and refuted the account of one of Rosales's friends, Rolle said. The prosecutor said Rosales might have acted like a gang member but did not appear to be one.

"I do not think that he was in a gang," Rolle said. "There was no evidence that he was a member of MS-13 or anything like that."

The Rosales family appeared to accept the outcome of the investigation. Family members initially were angered by the police handling of the incident. The police would not allow them to approach the body and covered it with a tent as investigators collected evidence.

"They do feel like they were treated fairly by the state's attorney's office," said Dino Flores, an attorney for the Rosales family. Flores said he did not know whether the family would sue the police department.