Stephanie McKeel, left ,practices a self defense move during a free two-hour self-defense class held at the Northeast Library on Saturday in Washington, DC. (Kate Patterson/for The Washington Post)

There was once a time when Melanie Ranier followed D.C. police on Twitter. She wanted to know what crimes happened where, which streets to avoid, who to keep an eye out for. But she doesn’t anymore. It was too scary. Too many of the crimes were happening close to her house near the H Street corridor.

“There were so many incidents,” said Ranier, 34, who works for a U.S. Senate committee. “It’s alarming . . . we’d check every day and there would be another incident a block from our house.” One woman, she said, was attacked with a brick near Ranier’s house.

So Ranier attended a self-defense seminar Saturday aimed at Capitol Hill residents concerned about mounting reports of crime in the community. With spring underway, and the most crime-ridden months upon us, some residents want to feel better prepared. In the two-hour session, they learned how to target the most vulnerable parts of an attacker’s body and quickly find others for help.

The class, which attracted six women of diverse ages, represents just one more way community members, rattled by an uptick in robberies last year, are altering their behavior and changing their routines. Some residents are walking their dogs only during daylight hours. Others say they now drive to grocery stores in other parts of town rather than walk to a nearby neighborhood market.

Ranier says she drives to Capitol Hill or takes a cab home if it’s after dark. Once, she said, a man she described as “very large” followed her for blocks, saying he wanted to walk her home. He left only after Ranier asked a driver idling at a stoplight for help. “There has been an increase in crime,” she said. “It’s an indisputable fact.”

Between November 2014 and November 2015, unarmed robberies increased from 35 to 43 on the streets around Capitol Hill, Stanton Park and Eastern Market. The surge was even more significant for armed robberies, which more than doubled, from 11 to 24.

Complaints and concerns have flooded Internet mailing lists, email chains and social media.

“I caught armed robbery on video in front of my home on Capitol Hill; alerted police to it but they never called back,” one man said last October on Twitter.

“Saturday night Halloween on Capitol Hill festive?” a woman tweeted . “More like dangerous, w/ robbery reported 2 blks away & sirens blaring everywhere.”

So a few weeks ago, the branch manager of the Northeast Neighborhood Library, Heather Petsche, decided to do something about it. She brought in a self-defense instructor named Lauren Taylor, who has spent decades teaching women to defend themselves against gender-based violence.

Despite the increase in robberies, the “reality of violence,” Taylor said, “is that for women and girls, the vast majority of attacks are by people we know.” So she dedicated most of the class to handling scenarios women are most likely to encounter — domestic violence and dangerous encounters at parties. (Taylor is also a Washington Post employee.)

If someone tries to mug you, she said, it’s best to give the person whatever object they’re seeking, then slowly back away without turning away until you’ve reached a safe distance from the thief. You have to think about the “probability that someone trying to rob you has a weapon,” said fellow instructor Tia Goodson.

The teachers also advised yelling “Stop!” repeatedly and in ascending volume if the person approaching doesn’t heed the warning. If the person continues, swing back one leg, then place both arms, bent at the elbow and palms facing out, in front of your body — ready to strike if necessary.

At the end of the class, Ranier said she felt more confident that she would know what to do in an unsafe situation. “I was a little nervous and didn’t know what to expect, but I’m glad I did it,” she said. “I feel stronger.”

Peter Hermann contributed to this report.