OAKLAND -- A resident exchanged gunfire with some men trying to break into his house across the street from Bret Harte Middle School Monday morning, apparently wounding one of them, police said.

Two other suspects were arrested fleeing the area.

The resident was not hurt and the school was on lockdown for more than 90 minutes while police conducted their investigation.

The incident occurred about 11:40 a.m. on the 3700 block of Coolidge Avenue when a resident exchanged gunfire with three men trying to break into his house, police said.

The resident was not hurt but a short time later, about 11:54 a.m., a man showed up at Highland Hospital in Oakland with gunshot wounds to the leg. Police believe the man is linked to the attempted robbery because a witness had reported seeing someone limping away from the home after the shooting.

Police also detained two other men fleeing from the scene, and at least one gun was found in the path of the suspects' escape, police said.

Police were trying to determine why the suspects targeted the house.

The lockdown at Bret Harte Middle School lasted until shortly after 1 p.m., "when normal activities resumed with restricted access to campus," according to Troy Flint, spokesman for the Oakland Unified School District.