Freshman year: a thrilling time of discovery and new beginnings as you strike out on your own for the first time. But with all the exhilaration of total freedom comes lurking terror as you embark on a journey that requires flip flops in the shower, a symposium on how to live on something besides cereal and ramen and the potential horror of an assigned roommate.

Dun dun duuuuh!

Worse than any boring 8 a.m. lecture class or TA with a vendetta, the person randomly selected to share your living space for nine months can make or break your initial college experience.

Years ago, when I moved into my apartment-style dorm at the University of Southern California, I thought I’d hit the jackpot with my three roommates, who all seemed smart and sweet. It was only later that I discovered I was living with a bulimic ballerina who left our bathroom reeking of iceberg lettuce and sugar-free Jell-O barf, a born-again Christian who showered and went to the bathroom in the dark because she was afraid of the sin of seeing her own body naked and a girl who gyrated in music videos but dreamed of becoming an NBA players’ trophy wife and thought it was OK to use my hairbrush (eww) or “borrow” my car without asking (That’s not borrowing, that’s stealing.). I spent as little time in that place as was humanly possible. But at least none of them boiled my bunny the way Leighton Meester’s character in The Roommate might have.

In the vein of Single White Female and Fatal Attraction, Meester stars as Rebecca, a privileged girl from Pasadena assigned to a dorm room with Sara (“Friday Night Lights” star Minka Kelly). The pair becomes fast friends, sharing clothes and nights out on the town, but when Sara befriends a fun-loving party girl (Aly Michalka from “Hellcats”) and scores a hot new boyfriend (Twilight and Burlesque stud Cam Gigandet), Rebecca’s obsessive and erratic behavior spins dangerously out of control.

It’s a part that’s a far cry from Meester’s poised perfection as Blair Waldorf on “Gossip Girl” and a challenge she was thrilled to undertake, diving into research so she could cultivate a believable brand of crazy.

“This is the story of the psychological deterioration of a human being who has no real identity of her own and is trying to appropriate another person’s,” Meester says. “The character has so much depth. I had to find whatever I could in her to love, because I don’t think she means anybody any harm. It wasn’t an easy movie to make, but it was always interesting.”

The idea for The Roommate first occurred to writer Sonny Mallhi when he was a development executive at Vertigo Entertainment. Mallhi, who submitted the script under an assumed name to avoid favoritism, explains he’d spent years refining other peoples’ scripts, but always had the idea for a thriller that would combine two elements primed for tension.

“First, the whole freshman college roommate thing has always seemed uncomfortable to me,” he explains. “You are forced to live with someone you don’t know at all for a full school year. Things happen, for better or worse. You either end up being friends for life or never speaking to that person again. I also had this idea about stalking that I wanted to develop. Everyone stalks at some point in their life, whether they admit it or not. In high school, when you drove past someone’s house because they didn’t answer the phone or rode your bike past someplace they said they were going to be – it’s all stalking. When I melded the two scenarios together, I came up with the idea for The Roommate.”

Though she laughs off any suggestion that she has indulged in Facebook or online stalking (come on, haven’t we all done that?), Meester, who was already a successful actress in her teens and didn’t go to college to have a harrowing living experience, says she prefers to think of the process like a bad dating set-up.

“Being assigned the person you’re going to live with for the next eight or nine months sounds a lot like a blind date,” she says. “It’s strange to think that when you come to college, you have to live with someone you don’t know at all. The idea of sharing some totally intimate moments with somebody you don’t know that well is disconcerting and a great jumping off point for this story.”

With the script in place, Academy Award nominated Danish director Christian E. Christiansen, whose first full-length feature, Razone, explored the phenomenon of girls who bully in a stark, thought-provoking way, was hired to helm the film, whose tension, he says, comes from establishing a feeling of normalcy and then slowing upending it.

“When I read the screenplay, I could see the movie from beginning to end,” the director offers. “I thought it was sexy, it was hip and, most of all, it was dark and scary, which really turned me on. I love thrillers, especially from the ’70s and ’80s, and being offered the chance to do something similar was really exciting.”

Christiansen also reveals, “Leighton was the first person we cast for this movie. She is a fantastic actress. The role of Rebecca requires an actress who can go from normal to insane in very little time. Leighton did a lot of research for the role, trying to figure out what kind of person this would be.”

“She can turn creepiness on and off like a switch,” Mallhi adds. “She builds the small moments into bigger moments as the story goes on, giving the audience a feeling that Rebecca has done this before, maybe more than once. The audience doesn’t know what happened to her to make her behave this way. Was it something with her parents? Why is she a little ‘off?’ And Leighton plays her in such a way that I think people will want to hate her, but instead find themselves feeling sad for her as her story is revealed.”

Meester signed on after reading an early draft of the script and speaking to Christiansen at length about the movie he wanted to make.

“He was so open to everything,” Meester says. “It was really fun to watch the process of developing it. Everybody was bouncing ideas off of one another. Christian had a very specific vision of how he wanted things, which made me confident that it would turn out beautifully.”

Once on set, Meester discovered Christiansen, “does what I think of as ‘ninja’ directing. He doesn’t spell anything out; he just plants an idea in your head. Even if it’s not something that’s in the front of your mind, it’s back there, and the wheels are still turning. He conjured as much from me as he possibly could. He’s all about making things as real as possible and getting the most honest performance out of everyone.”

Meester’s Roommate co-star Minka Kelly adds, “When I first met with Christian, we talked about making an intense psychological thriller. On set, he was very patient and took the time to talk through each scene with the actors. There’s nothing cheesy or silly in the film. It is understated, very classy and honest. I just hope the audience is taken for a ride throughout the whole thing, and that they are perched on the edges of their seats wondering what’s going to happen next.”

Asked about Kelly, Meester grins, “Minka is very sassy, which is a really good quality for Sara to have. She is also approachable and very kind – and she’s gorgeous. You can understand why Rebecca loves her.”

The Roommate releases in theaters Feb. 4.