The pit bulls were running wild in Northwest Washington’s Brightwood neighborhood, a scene so chaotic that D.C. police said in a report that “grown men were jumping fences to get away from the dogs” on that Sunday afternoon in January.

When the three dogs attacked an 11-year-old boy riding the dirt bike he had gotten for Christmas, neighbor Benjamin Srigley jumped in to help. He retrieved his 9mm Ruger P-90 handgun from his house and fatally shot one the animals. A D.C. police officer shot and killed the other two.

But the 39-year-old’s actions — deemed heroic by the boy’s relatives — quickly became complicated. Authorities say Srigley had legally bought the handgun and two other firearms in Virginia, but he had failed to register them in the District.

Now, four months later, the D.C. Office of the Attorney General has decided to defer prosecuting Srigley, as long as he doesn’t break the law for two months, agrees to abide by gun laws and pays a $1,000 fine. If Srigley complies for two months, the charge of possessing an unregistered firearm, which carries a maximum sentence of a year in jail, will be dismissed. The decision was, said the attorney general’s spokesman Ted Gest, a way to recognize that Srigley had saved a child.

“The extraordinary circumstances of his role in saving the boy from the dogs’ attack also justified an extraordinary disposition,” Andrew Fois, deputy attorney general in charge of the public safety division, said in a statement.

Srigley, who works for a home remodeling company, declined to comment because the case is pending until mid-July. His attorney did not return calls seeking comment.

The case presented Attorney General Irvin B. Nathan with a difficult decision in a city with some of the nation’s strictest gun laws. It came just nine days after he decided not to prosecute David Gregory, host of NBC’s “Meet the Press,” for waving a high-capacity ammunition clip, which is illegal in the District even if it is empty, on national television.

Critics complained of a double standard for celebrities in the Gregory case. Commentary was muted on the dog case in part because many of the facts, including that the gun Srigley used was unregistered, remained unknown until court documents were filed in the case last week. The Washington Times first reported their existence on Monday.

The charging documents filed in D.C. Superior Court provide the first detailed explanation from police of what happened at Eighth and Sheridan streets that day, and of Srigley’s role in helping prevent the attack from becoming far more serious.

The boy’s uncle said at the time that the youngster had surgery for several wounds and that at least one of the dogs was biting the boy’s ankle when police shot it. The boy’s grandmother said on Monday that the youth continues to have pain in that ankle. Of the gunman being fined, the grandmother said, “I don’t think it’s fair.”

The documents state that Srigley gave a brief interview to police before requesting an attorney. He told them that he saw the dogs running and men fleeing. He then said he saw the dogs attack the boy at the opening of an alley between the victim’s house and his own.

He got his gun, went onto his front lawn and shot at the three dogs, striking one, police said. A police officer who was already responding stopped the attack. Two dogs died at the scene; the third returned to its home a block away and died there, police said.

“[Srigley] and the officer were successful in stopping the attack,” the court papers say. Srigley told police that the Ruger was not registered in the District. After consulting his attorney, the document says, Srigley allowed police to search his home, where authorities said they found additional ammunition, including 47 12-gauge shotgun shells, seven Remington 16-gauge shotgun shells and 36 Stinger .22-caliber rounds.

Police said Srigley then told them he had an antique M-1 rifle and a Mossberg 12-gauge shotgun in a storage unit in the District. Police said they found both guns in leather cases and without ammunition. Police confirmed that Srigley has no criminal record in the District or elsewhere.

D.C. police seized all of Srigley’s weapons, but prosecutors said in the agreement that he could get them back upon compliance with gun laws in Maryland, where he is moving.