Hard as it may be to believe now, there was a time when Bill Cosby was known as America's dad.

Back in the 1980s, he was the sweater-wearing Dr. Cliff Huxtable who dispensed wit and wisdom on the “The Cosby Show.”

Before that, Cosby was a beloved comedian and groundbreaking performer who broke through the Hollywood color barrier in 1965 by becoming the first black man to star in a TV drama series, "I Spy."

Bill Cosby laughs during an interview on Nov. 6, 2014. Evan Vucci / AP file

But for the past couple of years, his reputation has been in tatters after dozens of women have come forward with allegations of sexual misconduct and now he's faced a two-week trial during which he was accused of drugging and molesting one of them in 2004. He claims it was consensual sex.

The fact that his trial ended with a hung jury on Saturday did little to sway people in the court of public opinion who've already made up their mind about his guilt or innocence.

Cosby has steadfastly denied molesting anybody. But the damage to his image has already been done and it’s likely to be permanent, Bob Thompson, pop culture expert at Syracuse University, told NBC News.

"Irrespective of the verdict, I think the first thing Bill Cosby will be remembered for in history is this story," said Thompson. “I have students in my classes who have never seen an episode of ‘The Cosby Show’ and who know Cosby from this. He is never going to live this down."

Born July 12, 1937 in segregated Philadelphia, Cosby and his three brothers were raised in a housing project. His mother was a maid. His father was a steward in the U.S. Navy and was mostly absent for much of his childhood.

Bright and athletic as a teen, Cosby found his calling early on as a self-described “class clown.” After a four-year stint in the Navy and a shorter stint at Temple University, Cosby embarked on a career as a stand-up comedian.

BILL COSBY, performing during his TV special, "The 2nd Bill Cosby Special," on April 9, 1969. Courtesy Everett Collection

Cosby got his first big break in 1963 when he appeared on "The Tonight Show." Then came a recording contract with Warner Bros. and a string of successful comedy albums filled with hilarious anecdotes from his childhood.

As Cosby’s star rose, he found himself targeted by critics who questioned why he was avoiding the touchy issue of race at a time when the rest of the country was being engulfed by the Civil Rights struggle. This was his answer:

"A white person listens to my act and he laughs and he thinks, ‘Yeah, that’s the way I see it too,'" Cosby said. "Okay. He’s white. I’m Negro. And we both see things the same way. That must mean we’re alike. Right? So I figure this way I’m doing as much for good race relations as the next guy."

But race became unavoidable when Cosby was cast with a white actor named Robert Culp on the NBC series “I Spy,” a kind of espionage buddy show. Four TV stations in Alabama, Florida and Georgia refused to air the show. But “I Spy” was a ratings hit and Cosby went on to win three consecutive Emmy Awards.

Robert Culp and Bill Cosby in I SPY, 1965-68. Courtesy Everett Collection

“Let the message be known to bigots and racists that they don’t count,” Cosby said after winning his third Emmy.

Thompson said in many ways Cosby was to television what Jackie Robinson was to baseball.

“Most people don’t realize now how important Cosby’s role on ‘I Spy’ was,” the pop culture expert said. “He wasn’t singing or dancing or doing an 'Amos ‘n’ Andy' routine. He was an attractive, Princeton–educated character and he was the star, something most Americans had never seen before.”

More successful TV turns followed, including a Saturday morning cartoon show based on Cosby’s childhood called “Fat Albert and the Cosby Kids” and regular appearances on public television that endeared him to a whole new generation of TV watchers. He also made a fortune as a popular pitchman for Jell-O pudding, Coca-Cola, and other products.

But his greatest small screen success came in September 1984 with the debut of "The Cosby Show," a family sitcom set in brownstone Brooklyn where Cosby was paired with Phylicia Rashad, who was modeled on Cosby’s real life wife, Camille.

Bill Cosby and Phylicia Rashad in a publicity photo for the ''The Bill Cosby Show" Globe Photos / Zuma Press

“The Cosby Show” centered on the kind of African-American family that many viewers had never encountered on TV before — thriving, educated, middle-class professionals, not offensive stereotypes or one-dimensional caricatures.

Cosby also gave himself something he didn’t have as a child — a loving jazz musician dad named Russell who stuck around.

It was a huge success and continued to delight viewers long after it went off the air in 1992.

Cosby became a living, breathing rebuff to the stereotype of fatherless African-American families. But he also had to contend with tragedy when his son Ennis was murdered in 1997, the victim of a botched robbery. He had been the model for Theo Huxtable, the underachieving young charmer Malcolm-Jamal Warner played on "The Cosby Show."

Bill Cosby at the presentation of the Presidential Medal of Freedom ceremony with George W. Bush at the White House on July 9, 2002. Hyungwon Kang / REUTERS

In 2002, President George W. Bush presented Cosby with a Presidential Medal of Freedom.

Meanwhile, Cosby became an elder statesman in the black community and at times a scold who, in one famous speech, didn't shrink from telling young men to pull up their pants.

The first public inkling that there might be something sinister behind Cosby's good guy facade emerged in 2004 when a former Temple University employee named Andrea Constand became the first woman to publicly accuse him of sexual assault.

THE COSBY SHOW -- SEASON 3 -- Pictured: (back row, l-r) Lisa Bonet as Denise Huxtable, Malcolm-Jamal Warner as Theodore 'Theo' Huxtable, Phylicia Rashad as Clair Hanks Huxtable, Sabrina Le Beauf as Sondra Huxtable Tibideaux, (front row, l-r) Keshia Knight Pulliam as Rudy Huxtable, Bill Cosby as Dr. Heathcliff 'Cliff' Huxtable, Tempestt Bledsoe as Vanessa Huxtable -- Photo by: Alan Singer/NBCU Photo Bank Alan Singer / NBC Universal

Cosby denied the charge. And citing a lack of evidence, prosecutors refused to press criminal charges.

So Constand sued and Cosby quietly settled with his accuser for an undisclosed sum in 2006. And it wasn’t until October 2014 that the Cosby scandal exploded.

Ironically, it was detonated by another black stand-up comedian performing in a Philadelphia nightclub named Hannibal Buress.

In his routine, Buress uttered the line, “Yeah, but you raped women, Bill Cosby, so that kind of brings you down a couple notches.” It was a line that the comedian had used before, but this time it went viral.

Soon women from as far back as the 1960s who had been too afraid to confront Cosby surfaced with claims that he had preyed on them.

"It’s weird that is happened like that,” Buress later told Variety. "I was calling a bunch of other comedians rapists and that was the only one people took seriously."

Cosby insisted the accusations were lies as more and more women came forward with civil lawsuits. He buttressed his argument by noting that he has never been charged with a crime.

But Cosby’s credibility took a serious hit in 2015 when the Associated Press obtained the Constand court documents in which he admitted slipping Quaaludes to women.

“When you got the Quaaludes, was it in your mind that you were going to use these Quaaludes for young women that you wanted to have sex with?” Constand’s lawyer Delores Troiani asked.

"Yes," Cosby answered.

Cosby continued to maintain his innocence, saying the two had a romantic, consensual relationship. But he quickly became a public pariah. And finally, in December 2015, Cosby was arrested and charged with sexually assaulting Constand.

Thompson said that was a tragic coda to what had been a remarkable career.

“I still teach Cosby in my 'history of TV' class,” he said. “His role in the history of American television is really, really important. But now, of course, whenever I get to Cosby I have to preface it with a measured apology.”