Back in late January, EW broke the news that a major character on Desperate Housewives would die during the March 11 episode of the long-running ABC soap. The identity of the character was to remain secret until the episode premiered, of course, to preserve the surprise element of the storyline. But the details trickling out of testimony at the Nicollette Sheridan wrongful-termination trial in Los Angeles have messed with that plan: The news of the character’s identity leaked out today in the ongoing court battle.

EW was on set for the character’s dramatic final moments and had the first, exclusive interview with the star. Since the news is already out there, we thought we’d share an excerpt of the interview after the jump, but – SPOILER ALERT! – do not click if you don’t want to know who got the ax. But, read on if you want to hear how the actor was told, the reaction of co-stars, and what’s next.

Yep, the photo here tells you what you need to know: James Denton’s sexy plumber Mike Delfino is the one leaving the Desperate Housewives fold, just about two months shy of the show’s series finale. As you might imagine, Delfino meets his demise via an encounter with the mob, which echoes troubles his character dealt with earlier in the series. EW sat down with the affable Denton to discuss Mike’s demise.

ENTERTAINMENT WEEKLY: When did you find out that Mike was going to bite the dust?
JAMES DENTON: Between Thanksgiving and Christmas, last year. [Desperate Housewives creator] Marc [Cherry] asked, “Could I talk to you for a minute?” I had no idea what it was about. I had finally – after seven years of worrying about being killed off – I’d realized, well, I made it till the end. [Fellow Desperate Housewives husbands] Doug [Savant] and Ricardo [Chavira] and I made it till the end. That was the first time Marc has ever given me the “we need to talk” line and I didn’t think it was me getting killed because it was so close to the end of the series. Then, he called and he said, “We have this idea,” and he told me.

How did you react?God bless Marc. He wants so badly not to hurt anybody’s feelings. He didn’t want me to be unhappy about it, so he was breaking it to me gently. The whole time I’m biting the inside of my cheek because I was trying not to crack up because it’s fantastic for me. We’re almost through, anyway.

So wait – you were thrilled?
Oh yeah, because when he first told me, I was really surprised. Any other year, I would have been disappointed, but at this point I figured, well, we made it. But as soon as he told me, it was a little bit like, “Oh, it’s a bummer because I won’t be around for the wrap.” We’ve got such a great crew. We’re all such good friends. That’s kind of a drag because there’s six or seven episodes left.

I know you already shot the scene where Mike is killed. Will we see you after that in flashbacks or anything else?
That would have been it, yeah, but in episode 17, I have to go lay in a box and do some flashbacks. We have the funeral and some flashbacks, and that’s it.

You and on-screen wife Teri Hatcher get to have a nice little moment before the demise, right?
I told Marc, “I wish you’d give me scenes like this for the last five years.” It’s a really nice scene. But also, earlier in that episode, somebody has tried to break into our house. I’ve gone to the cops and said, “Okay. I know this guy. We had a fight. I know who it is.” The cops basically say, “You shouldn’t have messed with loan sharks. Toughen up.” At least in this episode, you remind people that it may be him who was trying to break into our house so it’s not totally out of the blue. Also, in this episode there are a lot of false gets.

What do you mean by that?
Like in beginning of the episode it says, “In 24 hours, one of these people will be dead.” In the teaser that night it’s Mrs. McCluskey, Bree, Tom’s new girlfriend Jane, Gaby and Carlos’ daughter Juanita, and my character, Mike Delfino, so it’s a wide shot of the neighborhood. Throughout the episode, each of them has a near brush with death. They’re all very funny.

In terms of the storyline, do you think it’s a fitting way for Mike to go out?
I do because he was such a shady character in the beginning. We weren’t sure what he was up to. In fact, in the very beginning, Marc had this idea that Delfino might have mob connections and that’s why his name was Delfino. Then, when he had the whitest, WASP-y actor in town come in and be Delfino, he let the mob connection die. I think from the beginning he’s had this idea of Delfino and the mob and that criminal past. We just haven’t addressed it in four or five years. It’s perfectly fitting and especially because they’re going to do some flashbacks in this episode that show his life flashing before his eyes. It’s going to be slow motion with scenes from the pilot all the way. I’m hoping some of that will be some of his criminal dark side.

Mike meets his end violently.
Absolutely. It’s actually brilliant. As an actor, you just hope people care.

Do you think there will be a segment of viewers who will just say, “Finally!”?
Oh, absolutely. There always are. Read the internet. Read the blogs. I don’t, but my friends do. My friends would send me these emails saying, “Do you realize that you’re made of wood?” I don’t read that s—. No, you’ve got to believe. There’s plenty of people that hate the character or hate me or whatever. I do think people pull for Teri [Hatcher]. I think Teri has this great on camera quality that they pull for her. Because of that, the audience might be very disappointed if she doesn’t get a happier ending to her life.

It is sort of a sad ending for Teri’s character Susan Mayer.
It does suck for Teri. Also, it’s going to be hard for her to play any comedy for the last six episodes.

And that’s what she’s done so well in Desperate Housewives.
Yeah, that’s her specialty. I feel bad for her.

What was Teri’s reaction to the news?
I asked them to let me tell her because she and I have become really good friends. She’s always looked out for me. I don’t know about the women and their husbands, but I know she’s always been protective of my character. When they talk about cutting my episodes, she’s always defending me.

Saying things like, “No, we need Mike in there,” or what?
Exactly. So I knew if she heard from someone else she would immediately wonder if I was okay with it. When they finally let me tell her – which was only about a week before we got the script – her immediate reaction was she got teared up and she said, “You know what? I realize this is good for you, so I’m okay with it.” That’s exactly what she said. Then, we talked about the fact that we weren’t really convinced that audience would like it. She expressed some concerns that, for viewers, it may not be their first choice. Then, we talked about the fact that it would prohibit her playing a lot of big comedy anytime soon. She doesn’t really have enough time to get over it. But we both agreed on all those things. I can honestly say the first thing she said about it was, “This is going to be great for you, so it’s okay.” That’s how she’s been with me from the beginning. She’s been great. That was pretty much it. Then, she says, “Okay, get out of here before I start crying.”

Was it difficult shooting that final scene with her on the porch?
I remember laying in the threshold with the blood pouring out of me looking up at the top of the porch. I’ve been there for over eight years, and I’ve done so many scenes on that porch, from our first date to when we moved in together to when we moved out to when we moved back in. I remember lying there – not to be melodramatic – I was laying there between takes with that blood pouring out of me staring up at the porch ceiling. It was a little creepy.

Weird, because it all began and ended there. Sort of poetic?
Yeah, exactly. It was sort of fitting. Mike spends a lot of time in doorways. He hides in a lot of scenes in doorways – lots of leaning in the door. My old house, Dana Delany’s house, this house. It was kind of fitting that that’s where he met his demise.

You said you’re excited because it’s pilot season, and you’re going out for new TV roles. Are you looking to try to be on another series soon?
For me, it’s all about my kids. With TV, it’s the perfect world.

Because the lifestyle is good?
Exactly. But as far the work goes, films are more fun because you spend more time on it. You don’t move as fast, but my first choice is to stay in town on a TV show for my kids. But because of my kids, I’m not turning my nose up at anything. Whatever it is. if it looks like fun, I’m pretty wide open. It’s just excited to get back out there.

So have you been reading pilots?
Yeah, and I’m the only one. The other guys are trying to, but it’s going to be tough. Because if you have a decent role in a pilot, you’re going to shoot for two weeks. The only way you could do them both is if it was a really tiny role. Nobody wants to commit to a pilot deal for a tiny role. It’s perfect for me because February 10, I’m done. I’m really, really lucky.

Do you worry at all about being pigeonholed?
Most of the offers I got during hiatuses were Delfino as a cop, Delfino as a fireman, Delfino as a fire ranger. You have to resist that. At the same time, the character is pretty cool. Early on, there are much worse characters I could have been stuck with. Back when he was mysterious, he was really interesting. I’m totally not complaining. There’s a Delfino on every show so I could have done worse.

Anything you want to add?
Just that I think it’s really funny because through all the interviews, all the talk shows, people would ask what I wanted on the show. I’d say: “I just want to live. Just don’t kill me. Whatever it takes, just don’t kill me.” And I made it with six episodes to go – I almost made it. Delfino gets this really big exit, and I’m free for pilot season. It’s ironic. It ends up it’s the best gift I could have gotten.