John Mahoney spent the final months of his life doing exactly what he loved — acting. In one of his last in-depth interviews before his sudden death, Mahoney spoke with Fox News about his time on “Frasier,” beating cancer twice and the greatest joy of his life.

The 77-year-old, who starred as cranky patriarch Martin Crane on “Frasier,” died Monday after a brief hospitalization. The Steppenwolf Theatre Company, where he served as an ensemble member for 39 years, announced the beloved actor had suffered from complications caused by cancer while in hospice care.

The British native, who called Chicago home, spent the final months of 2017 appearing in his last play, “The Rembrandt." Fox News spoke to Mahoney in October while he was in rehearsals for what would turn out to be his final role. It was a play he enthusiastically described as one of his favorite projects to tackle in recent years. He ended up wrapping up his role in the play on Nov. 11.

Fox News: Many fans still recognize you from your time on “Frasier.” How do you feel about the role today?
John Mahoney: When it was finally over, I wasn’t sorry it was over because I thought we had taken the show as far as we possibly could. But, leaving [the cast] was a heartbreak of immense proportions.

I absolutely loved David [Hyde Pierce], Kelsey [Grammer], Jane [Leeves] and Peri [Gilpin]. They were so close. When I left England to immigrate to the United States, I didn’t think I would ever miss anything more at that time… But it was just as bad to leave "Frasier" and those friends behind. I can’t tell you how close we were every single day for 11 years. We just adored each other and still do.

Fox News: Do you stay in touch with your castmates?
Mahoney: I certainly do. Kelsey is so busy, I rarely get in touch with him. But it’s always a pleasure when we do finally meet up or call each other. David, Peri and Jane — yes, constantly. I’m a godfather to Jane’s son Finn and I was just talking to Peri a few days ago to see when she would be back in Chicago… I keep in touch with them all constantly. I miss them every day.

John Mahoney 5

The cast of the sitcom "Frasier," (L-R) Dan Butler, John Mahoney, Peri Gilpin, Kelsey Grammer, Jane Leeves, and David Hyde Pierce, poses backstage at the 50th Annual Emmy Awards in Los Angeles on September 13, 1998. The series broke an Emmy record by winning for the fifth time. (Reuters)

Fox News: Kelsey Grammar previously told us you and Moose (Eddie the dog) didn’t get along.
Mahoney: That was a problem at times (laughs). I love dogs. But Moose… he tolerated everybody else. Jane constantly tried to make friends with him. I just realized right off the bat he’s not interested in me. So to heck with it! I’m not going to knock myself. I’ll just tolerate him as much as he tolerates me. And so, we got along all right. He bit me twice.

But I didn’t blame him. One time, we were getting in the car, and I closed the door on his tail, and he went and got me a good one. And then another time, in a scene I was supposed to pick him up to see if the boys had a job done on him at the vet. When I did, I did it from the back and he wasn’t expecting that. So as I picked the dog up, he turned around and bit me…. He was a temperamental actor as far as I’m concerned.

Fox News: You used to teach English and edit a medical journal. How did that lead to acting?
Mahoney: Acting was something I always wanted to do. But I guess I didn’t have the guts to do it. I immigrated to this country when I was 19 — I was born and raised in England. My sister brought me over here and she was a war bride. I just didn’t want to be living off them. I took what I guess you would call the easy way out. When I got out of the army, I went to school with the idea of becoming a teacher.

I taught English and worked my way through college as an orderly in a hospital. So by the time I was out of college, I had a Master’s degree in English and about six years of experience in medical work. When I moved to Chicago, I took a job as an associate editor on a medical journal because that’s what I knew. But I just got to a point in my life when I realized I just didn’t want to do this.

John Mahoney 4

Kelsey Grammer, left, with John Mahoney. (Reuters)

Fox News: And then what happened?
Mahoney: You know what made me truly happy? When I was a kid in England, I was in the children’s theater… I just felt I had to try acting one more time. And if I fail, I fail. But if I don’t, maybe I can find some sort of happiness and fulfillment in life. And I did. I enrolled in an acting class in Chicago… I got cast… Everything just fell into place… It was as if life said, “All right, let’s get going.”

Fox News: How does it feel to return to the stage?
Mahoney: It feels great. I decided two to three years ago that theater is really all I want to do. I’m not really interested in film and television anymore. It was a wonderful time and I enjoyed it very much. But, I did “Frasier” for about 11 years. I was basically living out of a suitcase because I never moved to LA. I came back almost every weekend and even though I did the show in LA, I lived in Chicago. That’s where I preferred to be. I don’t really care to travel anymore, especially as I approach the golden years. I just really, really love being on the stage and being home in Chicago to do it.

Fox News: You fought cancer over 20 years ago. What was that experience like for you as a working actor?
Mahoney: I had made some of my biggest movies when I was diagnosed. I wasn’t going to let this cancer get me. I waited too long to do this. When I was told I had cancer, I said “I don’t care. Let’s do whatever we need to do to beat it. It’s not going to get me.” And the doctors have always said that my attitude had a great deal to do with my cure.

I just absolutely refused to be beaten by it. It sounds like I’m daring fate. But it’s the truth. It made me work 10 times harder, 10 times more. I turned nothing down and instead tried to do almost everything I was offered to make up for the years that I hadn’t been doing it when I should have. I think that had quite a bit to do with my recovery. I did recover.

John Mahoney 3

John Mahoney rehearsing for "The Rembrandt." (Michael Brosilow)

Fox News: How are you these days [in October 2017]?
Mahoney: I recently had cancer again, stage three, three years ago. And to tell you the truth, I thought I just had a bad cold. But doctors said it was inoperable. It sounded really, really terrible, like I was on the way out. And now, according to my doctors, I’m clear of it now. I had my chemo, I had my radiation treatments, I lost my hair — the whole routine.

But once again, I think a lot of it, in addition to having great doctors, is just I’m so, so incredibly, unbelievably happy with what I’m doing that I think it took over my healing an awful lot. I refused to yield to it because I love what I’m doing so much. And I refuse to sit at home and feel sorry for myself. Instead, I just want to get out there and do another job.