Like most women, I’ve faced a handful of occasions throughout my career when men have made sexist or rude comments to me. These situations are always difficult, and it can be incredibly challenging to speak up in a way that feels authentic when you’re caught off-guard by a remark that makes you feel deeply uncomfortable.
Early in my career, I was working on a high-profile project for my company. It was late at night, we were hours away from relaunching a high-profile website, and the stress was palpable. There were close to 15 of us in a conference room: myself, a few editors, designers, developers, and one senior male executive. We all knew we had only one shot to get this redesign right: it had to be exciting, buzzy, newsworthy, and clickable.
We were in the middle of discussing possible photos to use on the homepage, when, out of the blue, the senior executive said: “Let’s post a photo of Fran in that short dress she was wearing the other day. That would get a lot of clicks.”
The room went totally silent. I was stunned. I had had a good relationship with this executive for several years, and this was the first time I had ever heard him say something inappropriate like this. And then, as his comment began to sink in, all eyes in the room turned to me, all curious as to what I would do or say.
In that moment, I was forced into a tightrope that I’m sure many of you have walked in your own lives: respond passively and you’re labeled as weak, too nice, a people pleaser; respond aggressively and suddenly you’re bitchy, too assertive, too ambitious.
Subscribe to The Broadsheet, Fortune’s newsletter for and about the world’s most powerful women.
In a sane world, making a stupid, inappropriate comment about a female colleague would tarnish a man’s reputation. But in reality, it is usually the woman’s image and career that are at stake. As a result, too many women choose to suck it up and stay silent.
That night in the conference room, though, I did speak up. After snapping out of shock mode, my instincts kicked in and I quickly said to the executive, “Can I please talk to you outside?” We went into the hallway, and I told my colleague directly and firmly, “If you want to get the best work out of me, that’s not the way to do it.”
He was horrified; he apologized immediately and explained that he was just trying to lighten the mood. Amazingly, he thought he was making a harmless joke.
What happened next surprised me. When we went back into the meeting, he apologized to the entire team. He admitted what he said was completely inappropriate and that he had too much respect for me and our team to diminish us with that type of comment.
At the time, I didn’t realize the power of what had happened. When I asked him to step outside, it signaled to my colleagues that I was standing up for myself. And for them. By telling him in private that his comment was unwanted, I avoided humiliating him and ruining our relationship. And by specifically tying my response to my work performance, I remained objective and kept the context professional, rather than personal.
Looking back, I unknowingly modeled to my team how to speak up assertively and professionally. Refusing to stay quiet can actually strengthen your relationships with colleagues, rather than hurting them. Confidence and self-respect are magnetic.
But confrontation is not easy. Discussing harassment—no matter how big or how small—is uncomfortable and the possibility of a bad outcome is real. When conversations like this do have a positive result, though, the power, message, and effect is undeniable. After this incident, I never heard an inappropriate comment from that executive again. I like to believe that he learned something from it, and that he now understands why we need a kinder, more empathetic, and inclusive work environment.
Fran Hauser is a long-time media executive, startup investor and celebrated champion of women and girls. Her first book “The Myth of the Nice Girl” is being published by Houghton Mifflin Harcourt in April 2018.