James Gandolfini, whose performance as Tony Soprano forever transformed the way we thought about the TV characters we invited into our living room, has died suddenly while on vacation in Rome. He was 51.

As the star of "The Sopranos," what was so amazing about Gandolfini wasn't so much the way he looked — TV had had overweight and/or balding leading men before (and at the start, Tony wasn't that big) — but the way that he acted. He was a mobster, and an unapologetic one. Tony Soprano took what he wanted, rarely cared about who was hurt in the process, and at times was more animal than man.

We had been told all our lives that we would not watch an ongoing series about such a man. A bruising, foul-mouthed giant with a dent in his forehead was the villain, not the protagonist. TV had always made compromises, always made sure that "flawed" heroes were ultimately redeemable and lovable.

Tony Soprano was not. And we loved him, often despite ourselves.

Much of the credit for the show, and the character, comes from "Sopranos" creator David Chase, but Chase has said that Tony wasn't fully-formed until Gandolfini was cast in the role.

The Jersey-born Gandolfini was one of three finalists for the role, along with fellow character actor Michael Rispoli and E Street Band guitarist Steve Van Zandt. Van Zandt was eliminated quickly, but as then-HBO president Chris Albrecht told me when I interviewed him for my book, the show could have gone in two different directions based on the final choice.

"Rispoli was great," Albrecht explained. "He was funnier than Jimmy, just because of the normal rhythms that he had. And we talked about it, and David said, ‘It’s a very different show if you put Rispoli in it or Jimmy in it, but the show I envisioned is the show that’s got Jimmy in it. It’s a much darker show with Jimmy in it.’ I think we sat with that for a moment. ‘Dark’ is not really a word you ever want to go for in television, but the other one was ‘more real.’ So we cast Jimmy.”

Gandolfini "just inhabited the tone of the script," Chase told me. "At one time, I had said that this thing could be like a live-action 'Simpsons.' Once I saw him do it, I thought, ‘No, that’s not right. It can be absurdist, it can have a lot of stupid s--t in it, but it should not be a live-action 'Simpsons.'"

While filming the series pilot episode, a bit of Gandolfini improvisation forever cemented the tone of the series. In one of the episode's final scenes, Tony discovers that his nephew Christopher (Michael Imperioli) has considered writing a screenplay about his life in the mob. The script directions said Tony would slap Christopher lightly across the face; Gandolfini instead picked up his smaller co-star to make abundantly clear how unhappy this development would make Tony.

"And I went, ‘All right, I got it. This is big s--t. This is serious,'" Chase recalled.

Chase, upon hearing the terrible news of Gandolfini's passing, said in a statement, "He was a genius.  Anyone who saw him even in the smallest of his performances knows that.  He is one of the greatest actors of this or any time.  A great deal of that genius resided in those sad eyes.  I remember telling him many times, 'You don't get it.  You're like Mozart"  There would be silence at the other end of the phone.    For (wife) Deborah and (children) Michael and Lilliana this is crushing.  And it's bad for the rest of the world.  He wasn't easy sometimes.  But he was my partner, he was my brother in ways I can't explain and never will be able to explain."

Gandolfini was an unknown when he took the part — if you'd noticed him at all before that, it was likely in a brief but memorable turn as a smiling gangster who fights with Patricia Arquette in "True Romance" — which meant we had no preconceptions about him or about Tony. Tony was who Chase (with that early unintentional prodding from Gandolfini) told us he was: a complicated, at times even empathetic, sociopath.

Tony Soprano was a monster, but an oddly relatable one. He struggled with his family, whether enduring the caustic disapproval of his mother or the misbehavior of his kids, and went to therapy to deal with panic attacks and a wide-ranging feeling of depression. But he also had no compunction about strangling a man to death while taking daughter Meadow on a college tour. He was vulnerable. He was charming. He was cruel and vindictive and angry and practically drowning in self-pity.

And Gandolfini played every facet of that character beautifully. When I heard the sudden, shocking news of his death, my mind immediately flooded with images of Tony Soprano at either his most horrible or human: Tony goading his sister Janice into rejecting the lessons of her anger management class because he can't stand to see her happier than he is; Tony brawling with Ralphie Cifaretto over the death of the horse Pie-O-My; Tony asking his senile, mean Uncle Junior, "Don't you love me?"; or Tony needling Janice and Bobby Bacala during the most violent Monopoly game ever played.

It was raw, astonishing work, year in and year out. It turned Gandolfini from an unknown into an icon, in a transformation he was never comfortable with. I've encountered many actors who are aloof about dealing with the press out of a sense of ego; Gandolfini's unease seemed to come from a more genuine place. This was new to him, and too much. Early in the run of the series, he sent Christmas cards to TV critics to thank them for the nice things they had written about the show, and even put his home address on the envelopes. Later, on a night when he was receiving an award from the Television Critics Association, I saw him surrounded by reporters who wanted to interview him; he looked like a cornered animal, and when he won again in later years, he sent a video message.

Because of that discomfort, I don't know that Gandolfini was that disappointed that the movie business never knew what to do with him, either during or after the run of "The Sopranos." He had small, often interesting parts — a gay hitman in "The Mexican," a moderate general in "In the Loop," the frustrated father in Chase's feature debut "Not Fade Away" — but always to the side of what the movie stars were doing. Some of this was typecasting — several times (most recently with "Zero Dark Thirty"), I heard moviegoers laugh in recognition at Tony Soprano popping up in the middle of somebody else's movie — but also the difficulty of finding anything close to the perfect alchemy of actor and role that Gandolfini found with Tony Soprano. He was, again, a character actor, and a great (if underused) one.

And his work on the show made possible Vic Mackey, Al Swearengen, Walter White, Don Draper and every complicated, riveting anti-hero (or worse) who followed him. "The Sopranos" was an enormous hit, and told the business that the old rules need no longer apply.

Much has been written and argued about the last scene of "The Sopranos." Did Tony live? Was he shot in the back of the head by Members Only Guy? And, either way, why did David Chase construct that closing sequence and blackout that way? I've always been a believer in the "Tony lives" theory — that what Chase is showing us is the miserable, paranoid feeling that comes with life as Tony Soprano, and that his only punishment is a life that, like the Journey song playing on the jukebox at Holsten's says, goes on and on and on and on.

I don't know that I'm right about my theory, and Chase has made clear he's never going to explain it himself. But as horrible a human being as Tony was, it gives me a small bit of comfort on this surprising, terrible day, to imagine Tony still alive, waddling out of his SUV and into the pork store, or calling up Dr. Melfi for one more shot at therapy.

James Gandolfini is dead, robbing us of several decades of amazing performances. Whatever happened when the lights turned out at Holsten's, Gandolfini's performance means that Tony Soprano will live forever.

Alan Sepinwall may be reached at sepinwall@hitfix.com