Decades before Sheryl Sandberg, the chief operating officer of Facebook, wrote her book “Lean In: Women, Work and the Will to Lead,” a small number of female journalists found they not only had to “lean in” but also had to “go in” — as in, enter the inner sanctum of the men’s locker room to be able to do their jobs as sportswriters.

Robin Herman, the first female sportswriter for the New York Times. (AP)

To say their presence was unwelcome doesn’t even begin to capture the hostility they encountered, from athletes, coaches, executives and fans. The ESPN documentary “Let Them Wear Towels,” which will be rebroadcast on ESPN2 Saturday at noon, Sunday at 5 a.m. and Wednesday at 10 p.m. Eastern time, describes how some women were escorted from the locker room and at least one petite newspaper woman was picked up and carried out. They were subjected to various forms of harassment and received bags full of hate mail.

Christine Brennan, Jane Gross, Robin Herman, Michele Himmelberg, Melissa Ludtke, Lawrie Mifflin, Claire Smith, Lesley Visser and others had the courage to fight for an even playing field for women who wanted to cover sports, and their legacy is visible in the bylines on newspaper stories and the faces of sportscasters on local and national broadcasts.

In some cases, they had to go to court to gain access to the locker room. In others, they had to persuade executives of professional sports teams and leagues that equal access was a matter of being able to do their jobs, not a desire to become peeping Thomasinas.

Melissa Ludtke, who as a reporter for Sports Illustrated sued Major League Baseball to gain equal access to the locker room, went through struggles not unlike those of women entering other predominantly male fields. But the metaphor from the sports world was easy for people to understand: “There’s a locked door, men are on the other side, women are trying to barge through,” Ludtke said in a telephone interview.

Acknowledging the hurdles women in other fields faced, Ludtke read an e-mail message she had received from her freshman roommate at Wellesley, who went on to work in finance, after “Let Them Wear Towels” was first broadcast on Tuesday night:

“Wow does that bring back memories!!!” the e-mail read. “We were so young and went into those jobs with no realization at all that we weren’t supposed to be there. Hard to believe we were so naive but maybe that’s why we were able to make the headway we did, by just focusing on getting the job done professionally.  I was the first female muni bond reader at JPMorgan at the time and had similar experiences (without the hate mail or cartoons).”

Among the lessons from the ESPN documentary are that women need to stand up for themselves, to maintain professionalism and aspire to excellence, to recognize allies and make use of them, and to give back by helping those who follow them.

Ludtke added, “You have to know the setting, know where you are, play the game the ways the boys are playing it and still know who you are.”

Making personal connections with people and being willing to reveal that you’re “a decent, interesting person yourself,” helps in these situations, Ludtke said.

Women in all professions are generally advised not to cry in the workplace. But the sports journalists admit to having shed some tears.

In the documentary, the baseball writer Claire Smith, who now works for ESPN, talks about a time when she was barred from the Los Angeles Dodgers’ locker room. After being ejected, she stood in a corridor crying as she wondered how she would be able to get her story written without any quotes. Then Steve Garvey came out to talk to her and said that he would give her as much time as she needed but that first she needed to stop crying.

“When I cried in the tunnel I was by myself and it was a stress relief that topped screaming or pitching a fit,” Smith said in an email message. “When I cried, again upon seeing Steve Garvey, it was a combination of influences. Someone I’d admired long before I started writing professionally, someone who’d encouraged me every step of the way, just backed his words with actions. That overwhelmed me in a positive way. And the answer to killing the stressor broke the inner tension. I was going to be able to do my job and the relief briefly overwhelmed me. Bottom line: Steve’s few, perfect words not only helped me refocus, but put my game face back on — for that assignment, that series and the rest of my career.”

Speaking of how Jackie Robinson broke the color barrier in baseball and how Melissa Ludtke opened the locker rooms, Smith says in the film: “I’d like to think that it mattered, what Jackie did, it mattered what Melissa did, not just because of baseball, but because of what it meant to society. It transcended baseball, it transcended sports. Those were steps taken by very brave people, steps that advanced the society, and I’ll always believe that.”

And Ludtke believes that it’s important to tell these stories to younger generations, both male and female.

“I watched it with a young boy when it was broadcast,” she said of “Let Them Wear Towels,”  “and he was wide-eyed.”

Carla Baranauckas is a freelance editor and writer who has worked at the New York Times, the St. Louis Post-Dispatch, the Grand Forks (N.D.) Herald, the Edwardsville (Ill.) Intelligencer, the Texarkana Gazette, the Pampa (Texas) News and the Minneapolis Tribune. Follow her on Twitter at @cabara.