A 20-year-old District man has been charged in a series of random stabbings of women in and around Petworth and Bloomingdale that unnerved residents of the two rapidly gentrifying neighborhoods.

Garey Jones III, 20, of Northwest was charged Saturday with assault with a deadly weapon in an attack Wednesday night in the 1100 block of Allison Street NW, just off Georgia Avenue and north of the Petworth Metro station. Police believe that he is responsible for three similar attacks, including one June 13 in Bloomingdale.

Police arrested Jones on Friday after two detectives in an unmarked car spotted him acting erratically near Seventh Street NW and Sherman Circle around 11 p.m. Jones matched the description given by victims, police said. After questioning him, the detectives obtained a warrant to search his home, where they found clothing that they said linked him to the four attacks. Police continue to investigate, and more charges are possible.

“I feel confident we have the person responsible for these attacks,” Police Chief Cathy L. Lanier said Saturday, just days after warning women in Petworth not to walk alone. “I think the danger has passed. People can relax.”

Police don’t have a motive, but Jones’s mother told investigators that her son is under a doctor’s care for a mental disorder. Authorities seized his medication, which is commonly prescribed for schizophrenia or bipolar disorder, according to court documents.

Jones appeared Saturday afternoon before D.C. Superior Court Judge Richard Ringell, who placed him under “preventative detention,” which allows authorities to hold him for three days without bail. He has a preliminary hearing set for Monday.

The assaults occurred within the past seven weeks late at night and early in the morning as the women walked by themselves.

The assailant approached the women from behind, grabbed them and stabbed them with a sharp object before running away.

There was no clear motive. None of the women were robbed. Nor did they suffer life-threatening injuries, police said.

The women appeared to be chosen at random, police said, reminding some residents of another spate of random attacks in Petworth a year ago by a hammer-wielding assailant.

The arrest came on the heels of a public appeal by police for help catching the suspect.

Residents welcomed news of Jones’s arrest, including several who live on the street where the first attack took place in May, about four blocks from where police spotted him Friday.

“I’m very relieved,” said one longtime resident who gave only her first name, Diane. “I heard the lady screaming. It was very loud. We didn’t know what had happened.”

“It’s probably the most disturbing thing that has happened so far,” said Will Starck, 26, who about a year ago moved into a group house off Georgia Avenue NW, not far from the site of Wednesday’s attack.

He said he often worries about his girlfriend, Caitlin Crowley, 24, walking at night to and from the Metro station. She said she generally feels safe in Petworth but that the attacks had made her a little nervous.

“In a situation like this, in a neighborhood in something of a transition, the disparity between how safe the males feel and how safe the females feel becomes obvious,” Crowley said.