Howard Deutch and John Hughes thought they had "Pretty in Pink" all tied up at one point. The director and writer/producer, respectively, shot the ending, finished the final edit and rolled out a version for feedback.

Much to their surprise, audiences actually really disliked the film's ending, to put it mildly.

“The ending didn’t work in the test screening … That shocked everyone because the architecture of the story was that love endures and overcomes everything,” Deutch told The Huffington Post about the original ending, where Phil "Duckie" Dale (Jon Cryer) and Andie Walsh (Molly Ringwald) end up together.

“The girls in the test screening didn’t go for that. They didn’t care about the politics; they wanted her to get the cute boy. And that was it. So we had to reshoot the ending," Deutch said.

That process, though, turned out to be a bit of scramble.

Laurel Moore/Paramount Pictures

“John had to figure out, ‘How can I deconstruct the whole through-line to this so it feels honest and that there’s a logic to it. And he did. He came to the editing room one day and said, ‘You know, I think that Andrew [McCarthy] (who played Blane McDonough) cannot have a date. He has to go to the prom alone. And that gave him the breadcrumbs to follow the rest of the ending so that they ended up together. But that wasn’t an easy thing to unravel,” recalled Deutch.

Laurel Moore/Paramount Pictures

The new ending took about three weeks to pull together. But it was worth it. "Pretty in Pink," which celebrates 30 years this month, had a successful run at the box office when it was released on Feb. 28, 1986, going on to become a fan favorite from the '80s Brat Pack era.

"Pretty in Pink" marked Deutch’s directorial film debut and Hughes’ first turn as producer behind a major film.

Asked if he ever thought the teen flick would achieve the success it did, Deutch said, “God no! We just thought it was his opportunity to produce his first thing and my first chance to direct a movie. We had no idea it would become what it became. It was a $7 million movie, which was not on the radar … to be a big hit.”

Deutch attributes the success to the Hughes' talent for writing a film about romance, lust and social cliques in high school.

Howard Deutch

"The character Duckie ... is the universal kind of experience for a lot of guys, and women for the character Molly played," said Deutch, who has recently directed episodes of "Jane the Virgin" and "American Horror Story." "[Hughes'] characters were never really manufactured. I’d be there at night when he was writing. He’d stay up all and night and I would eventually fall asleep. I would wake up at four in the morning and he would hand me these papers where he would mine this kind of gold out of these characters. I’d wake up and sometimes I’d see him crying or laughing as he was writing. Slices of John were in these characters … There was also a sense of truth and humor.”

Haven't seen "Pretty in Pink"? Or want to relive it? HBO Now is currently streaming the film, and HBO Signature will have a special airing of the film on Feb. 25 at 9 p.m. ET.

Meanwhile, check out some of the movie's best moments:

Also on HuffPost:

PHOTO GALLERY 1980s Style