A man came out of a house in Charles County with a semiautomatic rifle Friday morning, touching off a flurry of gunfire in a quiet residential subdivision, officials said.

“I heard shots” around 6:50 a.m., said Beverly Simms, who lives in the Lancaster subdivision of Waldorf. “A lot of them.”

She then saw a man rolling away from a doorway with his hands up, apparently in response to authorities’ instructions.

The county sheriff’s office said deputies and U.S. postal inspectors were trying to serve a search warrant in the 4600 block of Gadwell Place when the man with the gun emerged, “threatening officers” outside.

Shooting began, and the man “was incapacitated,” the sheriff’s office said. He was reported in stable condition at a hospital. The warrant was part of a mail fraud investigation, the office said.

Maj. Rob Cleveland of the sheriff’s office said witnesses indicated that the man had fired the rifle, described as similar to an AK-47. But an official determination is still to be made, he said.

The sheriff’s office identified the man as William Payton Bell, 23. No charges were reported.