Sex harassment, including unwelcome texts, physical contact and bullying, exists at big and small law firms, a survey of mostly female lawyers in Massachusetts shows.

The survey was conducted by the Women’s Bar Association of Massachusetts and the Rikleen Institute for Strategic Leadership amid the #MeToo movement that has spotlighted sexual harassment in the workplace.

The movement has claimed figures in media, entertainment and politics. But outside of allegations against a federal judge, Alex Kozinski, the legal industry has not made headlines over sex harassment.

The survey results covered boutiques to Big Law outposts, and were published this month by the bar association.

About 80 percent of the more than 1,200 attorneys responding to the survey, were women. The results were spread evenly across the Millennial, Gen X and Baby Boomer generations.

Behaviors described were similar across all firm sizes, Lauren Stiller Rikleen, president of the institute, said.

Nearly 38 percent of respondents said they’d been the recipient of an unwanted sexual email, text or instant message at work. Approximately 21 percent said they’d experienced or witnessed unwelcome physical contact at work.

More than two-thirds of those who said they had experienced or witnessed unwelcome physical contact said they didn’t report it.

“You really see a consistent pattern of people uncomfortable reporting for the same basic reasons: fear of retaliation, fear of loss of social standing in the firm,” she said.

Answers were anonymous to encourage responses. “The only way to get the kind of information we got would be to promise complete confidentiality,” Rikleen said.

After reporting an incident, one survey respondent wrote that “ultimately I was given less and less work after that until I left the firm,” according to the report. Another respondent wrote that one firm was aware of partners trying to date associates but “did nothing.”

Rikleen said there were interesting examples of large firms not following up on certain behavior when carried out by “somebody financially important to the lifeblood of the firm.”

Responses were collected between Feb. 5 and April 2.