OAKLAND -- Two men were shot by a robbery suspect Monday morning at a backyard marijuana grow in the Fruitvale District, but were still able to disarm, beat and hold the gunman for police, authorities said.

The victims' gunshot wounds, to their lower legs, were not life-threatening, police said.

The shooting happened about 10:07 a.m. at a house on Bridge Street, where about 40 marijuana plants were growing in the backyard.

At least two suspects, one armed with a gun, jumped over a back fence to apparently try and steal the pot plants, according to police.

When one of the victims went outside to see what was happening in the backyard, a suspect began shooting at him, prompting the other man to come outside to help him.

One of the victims was able to knock the gun away from the suspect with a stick, said officer Doug Keely. Both gunshot victims then beat the suspect into submission with their fists and a stick, and held him until police arrived.

The gunshot victims were taken to a hospital for treatment.

The 22-year-old suspect, whose name was not released, was also taken to a hospital for his injuries and was later arrested on suspicion of two counts of assault with a firearm and violating his robbery probation.

It wasn't clear if the two gunshot victims were residents of the home or caretakers of the grow. Police found documents at the scene indicating that the marijuana was being grown for medicinal purposes.