An attempt to steal dirt bikes from a house in upper Montgomery County led to a violent confrontation between the victims and the would-be thieves, Montgomery County authorities said. Police said they arrested three men in the theft attempt.

At least one shot was fired during the confrontation at about 8:40 p.m. Thursday in the Olney area of the county. No injuries were reported.

Three people in a house on Castle Garden Court heard a noise in the back yard and found that three dirt bikes had vanished, according to a police account.

A neighbor told the occupants of the house that he had seen three people pushing the dirt bikes on a nearby path, police said. The occupants, who were not identified, were joined by a friend and headed down the path.

They came upon the thieves, who dropped the bikes and ran, police said.

Two occupants of the house began pushing the bikes back to the house, but as they did, the thieves ran towards them, police said.

One thief punched an occupant in the face, police said, and a second “pointed a handgun in the direction” of the occupants of the house and fired. It was not clear how many shots were fired.

No one was hit, and the residents returned to the house to call police.

County police, using dogs and a state police helicopter, began a search. One man was arrested after being tracked by a dog. A pistol was found near the scene of the arrest, police said.

Detectives and patrol officers arrested two other men in the area, police said.

The suspects were identified by police as Michael Denis Woods, 23, of Ely Place SE in the District; Enoch Nelson, 18, of an unconfirmed address; and Junious P. Plummer, 24, of Foxhall Place SE.

Police said all three were charged with armed robbery. Woods also was charged with attempted second-degree murder, and Plummer was charged with second-degree assault, police said.