A flawed protagonist. A tone that turns easily from drama to comedy to smash-cut fantasy. A young and fetching professional woman who is more than willing to revel in her weaknesses.

Those sound like all the elements for a pitch that could make the rounds of premium cable and streaming services today. But in fact they were the were the essential ingredients in a Fox series that premiered 20 years ago: “Ally McBeal.”

The series birthed by David E. Kelley at the height of his network TV power defied easy categorization even as it quickly resonated with its post-yuppie, pre-millennial target audience.

To its creator’s surpise, “Ally McBeal” sparked a national conversation about the state and status of women in women’s movement. Remember the 1998 Time magazine cover that featured an insouciant Calista Flockhart juxtaposed against images of Susan B. Anthony, Betty Friedan and Gloria Steinem and asked “Is Feminism Dead?” Kelley sure does.

“I remember being kind of caught off guard because it was never our intention to put her out there as a role model for anybody or a poster child for a cause,” Kelley told Variety of the series that ran five seasons. Flockhart played a young lawyer in Boston who winds up getting a job at the same firm where her now-married boyfriend from college works. The show presented a mix of McBeal’s professional and emotional life, delving deep into the psyche of a modern young woman and her longing to find Mr. Right and have it all.

“She was just Ally, she was about all her foibles, her strengths and her weaknesses. I didn’t think she represented a class of people so much as just this one persona. So we were all a little bit thrown,” Kelley recalled. “I was surprise Time magazine was taking the character that seriously.”

Back in 1997, Kelley did not conceive Ally as a female archetype but rather a finely drawn person.

“What I love the most is that younger people have told me that Ally gave them the courage to be weak,” he said. “Ally was just ferocious in her weakness. She was not afraid to show those flaws or reveal her vulnerability. It didn’t make her a weak person to have weaknesses. The courage that character had was something we always tried to embrace and it’s nice to see that this was meaningful to the people who watched it.”

By contrast, when he was crafting the adaptation of the Liane Moriarty novel “Big Little Lies” for HBO, he was extremely conscious of the societal expectations and classifications assigned to women and how they juggle work and family responsibilities.

The “Big Little Lies” characters played by Reese Witherspoon, Nicole Kidman, Laura Dern and others “were informed by the double standard that many of these women are held to,” Kelley said. “They’re expected to have careers but god forbid they miss a moment of their children’s lives or they will be maligned. There’s just a bigotry there that men are not exposed to.”

Kelley said it was clear that “Ally McBeal” had a certain something that would register in the culture even before the show premiered. A virtual unknown before the show, Flockhart began getting attention from people, particularly women, once Fox started promoting the series. “Calista was getting approached at Starbucks with people recognizing her from the promo clips,” Kelley said.

The instant resonance of “Ally McBeal” was magnified by the fact that the show was shot right next door to Kelley’s ABC drama “The Practice” at his former studio compound in Manhattan Beach. “The Practice” had been on the air for about a year but had yet to make much of a mark. (“Ally McBeal” and “The Practice” went on to win the Emmy for comedy and drama series, respectively, in 1999 — a kudos feat that no showrunner has achieved before or since.)

“It was a little unnerving,” Kelley said. “That initial success was mind-blowing for the entire cast.” Like Flockhart, none of the supporting cast were household names at the start: Gil Bellows, Lisa Nicole Carson, Greg Germann, Peter MacNicol, Jane Krakowski, Lucy Liu and Portia de Rossi.

“Ally McBeal” also stood out from the pack for its highly inventive storytelling style. Ally was given to flights of fancy that would play out in front of her — such as the CG-created “Dancing Baby” that reflected her inner conflict about becoming a mother. The show wasn’t above a little slapstick to generate laughs, then make an easy pivot to more serious matters involving law and morality.

Kelley said it’s gratifying for him to hear from younger writers today that the show was an influence on their thinking about the possibilities of narrative storytelling. “One of the things I hear most often is that people liked the melding of tones. That wasn’t something that was done as much back then,” he said. “Life is both funny and sad, and we thought that a TV show should be able to be that too.”

Kelley credits the leaders of the Fox network and 20th Century Fox TV studio at the time for allowing him free rein to break rules on the show. “They championed that from the beginning,” he said.

Kelley recalled getting into “a little bit of trouble” with the network, however, when he opined publicly early on that he saw the series running for about five seasons — another idea that was well ahead of its time. Voicing a finite vision for a show was a no-no in the era when shows were expected to run as long as possible to squeeze profits out in syndication sales to local TV stations and cable channels.

“It was a meteoric show that thrived on its originality,” Kelley said. “Once it stopped being so original, I thought it would have to stop.”

Kelley’s projection turned out to be spot on. “Ally McBeal” closed its run in May 2002 after five seasons, as its viewership declined. The ending, which saw Ally decide to move from Boston to New York City with her young daughter, wasn’t exactly the story arc he’d envisioned. But co-star Robert Downey Jr.’s arrest on drug charges during season four threw a wrench in his plans to focus season five on Ally’s marriage and settling-down process.

“He was so good in year four — it was just a lot to live up to,” Kelley said of Downey. “I do think that season five was under-realized but there was nothing we could do, we couldn’t just go out and replace him.”

Fundamentally, Kelley credits much of “Ally McBeal’s” impact to the talent and charm that Flockhart brought to the screen. “There was something magical about the personification of the character that she brought to it,” he said. “It came through from those initial promos. Calista and the rest of the cast delivered on a show that was trying to present a communal look at how young people were trying to live their lives. I always really felt it was an affirmative story.”

Kelley himself has not watched a full episode of the show in many years: “It’s never been my thing to look backward,” he explained. But he did gain an interesting perspective this year on how the show has aged over the past two decades from his daughter, Claudia, who recently graduated from college and decided to binge-watch “Ally McBeal” via Netflix.

“The good news is, she loved the show,” Kelley said. “But she did say ‘Dad, we need to talk about the way you looked at women in this show.’”

After a healthy father-daughter discussion, Kelley suggested that Claudia pay closer attention to the storytelling structure and the plot devices.”

“I told her to pay attention to who we were making fun of in each episode,” he said. “Mostly, we were laughing at the men.”