In February 1985, after nearly three seasons of following a gang of lovable losers that included womanizing bar owner Sam Malone (Ted Danson), stuffy bar maid Diane Chambers (Shelley Long) and barflies Norm Peterson (George Wendt) and Cliff Clavin (John Ratzenberger), the writing-producing team of Cheers found themselves facing a major hurdle.

Nicholas Colasanto, who played dense bartender Ernie "Coach" Pantusso, died suddenly of a heart attack at age 61.

It was a development that could have derailed a show that had yet to fully hit its stride, but Cheers was able to overcome the loss and eventually thrive as one of the top-watched sitcoms on television thanks to the decision to cast a then-unknown Woody Harrelson as Coach's replacement.

READ MORE: Cheers Cast: Where Are They Now?

Harrelson caught the group off-guard with his loose audition

As producer Ken Levine later told The Hollywood Reporter, the idea was to replace Coach with another character who could serve a similar purpose.

"When Nick died, they wanted the new character to be similar because of the role Coach played," Levine explained. "Having such a 'dumb' character (from too many head concussions in baseball) allows you to get exposition out. When you explained things to Coach, you were really explaining it to the audience."

Producers also wanted a younger character that would leverage the prime demographic turning in to watch the lead-in show, Family Ties, and its star, Michael J. Fox. Coincidentally, this new character was to be named "Woody."

The Cheers team largely settled on their new hire following an extended casting call, but they continued to hold auditions, perhaps with the hope of catching lightning in a bottle.

As it turned out, that lightning was streaking through Los Angeles and preparing to zip back to New York City to take the stage for a role in Neil Simon's Biloxi Blues. Even though his immediate future was set, Harrelson liked what he'd seen of Cheers and decided to take a crack at the audition.

"I was really carefree because I knew I was going back to New York, and they'd pretty much decided on this one guy, but they were just doing a few more auditions, so I went in and I could tell right away — [the casting director] was like, 'Aha! Hang on,'" he recounted to THR. "She says, 'I want you to come in and do this for the boys,' right? Well, it turned out she was taking me in to meet the writers. I didn't know this."

Harrelson walked into the writers' room blowing his nose, an unfiltered moment that delighted the group. He then caught them off-guard again with his nothing-to-lose audition.

"This guy walks in wearing basketball shorts, a T-shirt and unlaced high-tops. He looked like he could be trouble if you crossed him," producer Peter Casey recalled to THR. "And then he read and caught everyone's attention in that room by doing one thing that nobody else did. When Sam told him that Coach died, he teared up and started to cry. You're sitting there going, 'This is a comedy audition,' but then he does that and it's like, 'Whoa, he can really act.'"

Woody Harrelson Cheers cast

The cast of "Cheers: (Clockwise from top left) Shelley Long as Diane Chambers, Ted Danson as Sam Malone, Woody Harrelson as Woody Boyd, John Ratzenberger as Cliff Clavin, Rhea Perlman as Carla Tortelli, George Wendt as Norm Peterson, 

He won over his costars and became one of the show's anchors

The writers had their fictional Woody, but the real one still needed to win over the cast members who missed the fatherly Colasanto.

Danson, the alpha male, responded to the presence of a younger, good-looking guy in a predictable manner.

"Offstage, it was [all] testosterone," he told GQ. "There was a half-court [on the lot], and the guys used to play basketball right before the show. We took him out to give him a lesson, and he kicked our asses. All right, we'll arm-wrestle. I still have, like, tendinitis in my elbow. He was just wiping the floor with me."

The gang soon warmed to Harrelson, who brought a youthful charm and zest that invigorated the cast and allowed them to move forward while retaining their cherished memories of Colasanto.

"I didn't have a brother, so Woody became my brother," Danson explained to GQ. "And brothers can be incredibly competitive and knock the shit out of each other, but they know they won't cross a line. I loved him."

More important for the show's survival, audiences and critics also took to his winning portrayal of Woody Boyd, the country bumpkin in the big city bar. Along with claiming an Emmy in 1989, he became an invaluable anchor when the cast underwent more upheaval, most notably with the arrival of Kirstie Alley as Rebecca Howe, Sam's new boss and female foil, for season 6.

Ted Danson Woody Harrelson Cheers

Ted Danson and Woody Harrelson on "Cheers"

Harrelson turned down the chance for an in-show promotion

By the early 1990s, Cheers had become a ratings juggernaut, and Harrelson's clout had reached the point where he was offered the opportunity to take over the fictional bar when Danson revealed that he wanted out of the show.

Although Cheers had launched him into stardom, Harrelson was still grounded enough to understand that the show would collapse without Danson, so he passed, according to GQ.

On May 20, 1993, more than 40 million households tuned in for the series finale, a bittersweet moment that paved the way for Harrelson to cement his Hollywood leading man chops as the star of Natural Born Killers (1994) and The People vs. Larry Flynt (1996), while also closing the book on his performance that helped make Cheers a favorite of so many.