Way back in 1995, Lorne Michaels took a chance on a young director and put Beth McCarthy-Miller in charge of “Saturday Night Live.” So it’s kismet that former “SNL” writers Tina Fey and Robert Carlock would ask her to helm the final episodes of “30 Rock.”

She was thrilled — but knew that great honor came with great responsibility.

“Directing the last episode of ‘30 Rock’ is like directing the last episode of ‘MASH’ or ‘Cheers,’ ” she says. “Then once you get it it’s like, ‘Oh god how are they going to do this?’ ”

Fey, however, was not worried.

“Because of her time at ‘SNL,’ Beth understands that the jokes are the priority,” Fey says. “Also, she is unflappable and incredibly flexible, which was great for ‘30 Rock,’ where the shooting schedule was often bananas.”

Most important, Fey and the other writers of the final two episodes needed someone they could trust to finish out their vision for the show.

“The biggest challenges were trying to wrap up these relationships in stories that let them have some emotion, while still trying to have the finale feel like a somewhat normal episode,” Fey says of the scripts. “It was important to us that wherever we left the characters at the end would be satisfying to longtime viewers.”

The choice of a woman director comes at a time when there is much debate over the lack of female helmers in the industry. However, this didn’t factor into the hiring decision.

“While it has been important to me over the years to have a diverse group of directors, having Beth direct the finale was less about gender and more about family,” says Fey. “She has been part of the show since season one … so it was fitting and comforting for her to help us finish.”

*Editor’s note: The “30 Rock” finale, nominated for both writing and directing, was a two-parter. Tina Fey and Tracey Wigfield are credited for writing “Last Lunch,” while showrunner Robert Carlock and Jack Burditt are credited for writing “Hogcock.” Beth McCarthy-Miller directed both. Fey is speaking for all writers here.