In the annals of best friend sidekicks in television history, a few names come to mind.

There’s Ethel Mertz for Lucy Ricardo and Ed Norton for Ralph Kramden. Jerry Seinfeld had a group of friends but the closest was George Costanza. Some are more animated than others: think Patrick Star for SpongeBob Squarepants and Barney Rubble for Fred Flintstone. There are the equal-opportunity friends like Dwight on “The Office” or Barney on “How I Met Your Mother.” And the list goes on.

Last week, the entertainment world lost the actress who I believe was the greatest best friend character of all time.

Valerie Harper, who played Rhoda Morgenstern on “The Mary Tyler Moore Show” and later on her own sitcom “Rhoda,” had been suffering with cancer for over a decade. Reports of her impending demise would appear on social media and on those gossip magazines at checkout stands, but then Harper would show up guest starring on some TV show looking as healthy as ever.

Although she had a long and varied career, starting as a dancer and chorus girl on Broadway in the early 1960s in “Wildcat,” costarring with Lucille Ball, and “Take Me

Along,” costarring with Jackie Gleason. She continued steady work for decades, including an ill-fated sitcom in the 1980s that ended with the actress in litigation with the network (and locked out of the show that bore her name). She was part of the Second City improvisational troupe where she met her first husband. Despite these and all of her other efforts, Valerie Harper will forever be known as Rhoda.

The character of Rhoda Morgenstern was introduced in the pilot episode “The Mary Tyler Moore Show.” Rhoda had been trying to get the beautiful Minneapolis apartment Mary Richards (Mary Tyler Moore) rented; Mary, the beautiful and polite Midwesterner, didn’t hit it off with the brash and frumpy New York girl at first, but a friendship was born once Rhoda rented the attic loft apartment upstairs. The house’s owner, Phyllis Lindstrom (Cloris Leachman) had one of TV’s best frenemy relationships with Rhoda. These characters were well-written and the performers gave it their all.

Rhoda was supposed to be a lovable loser. She worked as a window dresser at a department store in Minneapolis, and her plain-spoken, sarcastic ways often clashed with Mary’s sunny disposition. But the friendship was real. Best friends aren’t always exactly alike, anyway. The thing with Rhoda is that her character — well, honestly, the actor’s portrayal — made everyone around her better. Her timing was excellent, her quips and one-liners flew fast and furious, and it appeared Harper got along so well with her scene partners the show’s producers began talking about a spin-off for her character after the first season of MTM.

The Rhoda character moved over to her own series after four fantastic seasons on “The Mary Tyler Moore Show.” In the spinoff, Rhoda moved back to New York City and was back in the orbit of her parents, Ida (Nancy Walker) and Martin (Harold Gould), as well as her sister Brenda (Julie Kavner, the voice of Marge Simpson on “The Simpsons”). The great character development continued, but a critical decision was made early on that changed it all.

The producers and writers of MTM, who were also writing and producing “Rhoda,” had Rhoda meet a handsome building contractor named Joe in the very first episode of the spinoff. Only a couple of months later, Rhoda married Joe in the most-watched television episode of the 1970s. It was great TV and featured the principals from the parent series as well as the characters from the new show. So, for the next two years, the writers struggled to pen Rhoda as the happy housewife, dutifully serving her husband as she and her sister got into various misadventures. Yet, something was missing. The show was highly rated, but Rhoda was always the one who was supposed to be coming in second — the perennial loser at love.

In a move I don’t think any showrunner would have the guts to do today, they blew up the show in a very dramatic third season and had our leading couple go through a painful separation and divorce. While laughs could be found during this time, it made viewers uncomfortable to see the marriage come apart in such a way, even though the handling of it was done with heart and humor.

With Joe gone, “Rhoda” continued for another two seasons. By anyone’s standards, the show remained consistently funny and there were great performances by a very talented cast. However, by the spring of 1979, the show was gone. Though the character of Lou Grant carried on in a newspaper drama, all the other characters from the original “The Mary Tyler Moore Show” show were now off the air.

In watching season three today, I am struck by the brave acting choices Ms. Harper made as Rhoda. The snark was still there, but underneath we discovered someone who was absolutely broken by the experience of a divorce. It made for great television then, and now and we should all be grateful for the wonderful abilities of Valerie Harper for making Rhoda Morgenstern one of the greatest characters in TV history.