When Three's Company premiered on ABC on March 15, 1977, its premise — one man and two women, all single, living platonically in the same Santa Monica apartment — seemed scandalous. But underneath the show's bawdy humor and ridiculous hijinks lay a heartwarming comedy about three best friends who would do anything for each other.

The road to Three's Company was not easy.

Based on the British sitcom Man About the House, the series received three different pilots and underwent multiple cast changes before it finally hit the air. The setting moved from New York to North Hollywood to Santa Monica, and protagonist Jack Tripper (played by John Ritter) went from an underpaid chef at an upscale French restaurant to an aspiring filmmaker with a knack for cooking before finally becoming a hard-up culinary student who's looking for a place to stay while he attends school.

Ritter's two co-stars and roommates also underwent several casting and character changes before Three's Company aired. The second pilot landed on Joyce DeWitt as florist Janet Wood and Susan Lanier (who would go on to star in Wes Craven's 1977 horror film The Hills Have Eyes) as secretary Chrissy Snow. ABC president Fred Silverman decided to put the show's second pilot into the network's midseason lineup to air in March 1977, but he was unhappy with Lanier's performance and ordered a search for a replacement Chrissy.

As he perused audition tapes, Silverman landed on a hidden gem: Suzanne Somers, who'd only had a series of small roles up to that point (including a spot in 1973's American Graffiti) and appeared on The Tonight Show Starring Johnny Carson. "All of a sudden, they went by Suzanne Somers, who I hadn't seen, but I recognized her from an appearance on The Tonight Show," Silverman recalled years later. "I said, 'Back that up.' I backed it up, and she was great. She'd been passed on. And I said, 'I don't understand. This girl could play that part. Why was she been passed on?' And I couldn't get a straight answer. Anyway, we got her in that day and she was on the set tomorrow, and she was terrific in that part. And that was an accident because she should never have gotten the part."

Watch the 'Three's Company' Opening Credits

The holdout for Somers instantly paid off, as demonstrated by the third and final Three's Company pilot, "A Man About the House," which aired on March 15, 1977.

The episode opens with a hungover Janet and Chrissy cleaning up from the previous night's wedding reception for their third roommate, Eleanor, who has moved out and left a vacancy in the apartment. The ladies have several prospective roommates lined up to tour the apartment — but first, they've got to get rid of Jack, whom they find passed out in their bathtub in the morning.

As the new friends get acquainted, Jack — a rakish womanizer — develops an instant rapport with Janet and Chrissy. He also establishes his utility by cooking them a delicious breakfast and flaunts his nearly unrivaled physical comedy skills with a few expertly placed pratfalls. When Jack reveals he's staying at the local YMCA to save money while attending culinary school, the decision is a no-brainer: He'll take over Eleanor's share of the lease and move in with Janet and Chrissy.

There's just one hurdle: Janet and Chrissy's old-fashioned landlord, Mr. Roper, played by Norman Fell. Mr. Roper isn't keen on hosting platonic co-ed tenants, a problem Janet circumvents by emphasizing how respectful, hard-working and upstanding Jack is.

And when that doesn't fully convince Mr. Roper, Janet also tells him Jack is gay.

Thus begins the farcical, innuendo-heavy, often politically incorrect sitcom, which dominated ratings in its first six episodes and was quickly renewed for a second, full-length season with a prime-time spot. The show aired for eight seasons overall, collecting five Emmy nominations and one win in 1984, when Ritter took home a trophy for Outstanding Lead Actor in a Comedy Series.

"Come and knock on our door / we've been waiting for you," the Three's Company theme song bids viewers. For nearly a decade, they happily obliged, setting up one of the most successful sitcoms and beloved three-pronged lead casts of its era.

28 Classic Films That Were Turned Into (Mostly Failed) TV Shows

Many classic '70s and '80s flicks have spawned TV series - but few have found success. 

More From 92.9 NiN