“You always hurt the one you love.” — Alan Roberts

Lee Holloway (Maggie Gyllenhaal) is in the market for a job. It’s been a long, hot summer, and she’s fresh out of a mental institution. It wasn’t one of those “Snake Pit” rubber room places; just a quiet, private home where she could get over her habits of cutting herself with porcelain dolls, scissors and screw drivers and burning herself with hot tea kettles.

To look at Lee, you wouldn’t know she was into this sort of thing; but then, looks deceive. When you meet her family, you’ll wonder why they weren’t in there with her.

Daddy (Stephen McHattie) is an overindulgent drunk with a bad heart; Mama (former “Cinderella” Lesley Ann Warren) is a suffocating weeper; and her more beautiful, better-loved sister is having a big wedding just as Lee comes home.

Home she is, and she can’t just sit around the house with her box of cutting toys, because Mama has locked them up in the kitchen. So bereft of social skills, Lee decides to learn to type and joins a secretarial school, where the teacher seems a bit domineering himself.

Armed with a 100-words-a-minute imperfect typing speed, Lee goes looking, and sure enough, a job opens up. Not far from home a big sign on a private office reads, “Secretary Wanted.”

Lee applies and meets the hero of our piece. Well, hero might be a bit generous for E. Edward Grey (“Boston Legal” great James Spader). Foreshadowing alert: As Lee enters the office, the former secretary is on her way out, soaking her box of belongings in tears.

We meet E. Edward in his office, an obsessive-compulsive disorder sufferer’s Disneyland World of Wonders, where everything is in perfect order. Grey warns Lee that he is a relentless, demanding boss; that he insists on perfection; and that the job is so boring she will not last.

Weary of the excitement of jabbing herself with needles and burning herself with hot kettles, Lee takes the job, and so begin the excellent adventures of Lee and Edward.

Lee has a boyfriend (Jeremy Davies, “Justified”), a twitchy, sincere fellow who offers her a ring. But there is something more intriguing and strangely exciting about Mr. Grey. We don’t see it, but Lee does.

Hold on. We will.

For weeks, Lee just can’t seem to get it together. Grey starts to come on a like a sadistic warden in an old Warner Brother’s movie. He criticizes each error, no matter how small. The tension builds and comes to a climax, so to speak. After a one badly typed letter, he bends her over his desk and spanks her.

This may seem like sexual harassment to you, but Lee takes to it with lip-smacking pleasure.

When boyfriend Peter just doesn’t catch on to her needs at home, Lee ramps up the action in the office, making greater and more vivid errors, until the perfect marriage of the neat-freak sadist and doe-eyed masochist comes to blissful fruition.

The heat grows between boss and typist. With a plethora of S&M’s greatest hits, it all culminates in one long, hilarious and touching three-day S&M tryst that forces our girl to sit, hands on desk, in the office in a wedding dress (she just dumped poor Peter at the altar), which will attract an intervention by her family and national media attention.

But this is no simple rent-for-a-buck porno flick, even with one or two spanking and explicit masturbation scenes that could qualify it. This is Steven Shainberg’s (“Hit Me”) movie, which garnered some neat awards such as the Special Jury Prize at Sundance, and a Golden Globe nomination for Maggie.

It’s a complex and funny peek into the needs of those who live on the purple twilight side.

Spader, one of Hollywood’s truly fine actors, who can tap dance across flashing comedy and drama in one movie (“Lincoln”) and dazzle in TV shows such as “The Office,” “Seinfeld” and “Boston Legal,” delivers the same goods here.

Maggie Gyllenhaal, an Academy-nominated Best Supporting actress (“Crazy Heart,” 2009) has yet to come to full measure on the screen. She’s simply an incredible talent. In “Secretary,”  she pulls out all the stops in one jaw-dropping scene after another, pulling laughs and tears from us when we least expect them.

“Secretary” slipped by in 2002, I think, because of the strong off-beat sexual theme. But in 2013, it could have a bigger audience, because, under all the S&M and quirky characters, the obvious theme is women’s empowerment. 

At the end, all involved come to realize that one smart girl is in control. It’s Maggie’s world and they all live in it.

J.P. Devine, of Waterville, is a former stage and screen actor.