Warning: This article contains spoilers fromLuciferseason 5B.

The end ofLucifer’s fifth season threw several curveballs at fans.

During the fight, though, Michael, wielding Azrael’s blade, killed Chloe.

Lucifer

JOHN P. FLEENOR/NETFLIX

To everyone’s surprise, though, Lucifer’s sacrifice didn’t cause him to die.

ENTERTAINMENT WEEKLY: When and how did you decide that Dan should die this season?

JOE HENDERSON:We hate Kevin Alejandro [Laughs].

Episode 513 of LUCIFER

Lesley-Ann Brandt and Tom Ellis in ‘Lucifer’.COURTESY OF NETFLIX

ILDY MODROVICH:We love him so much.

That’s why he was chosen.

So that’s why we did it.

I’m kind of talking in non-spoilers because it affects season 6.

This was supposed to be the final season at one point.

Dan started out as a corrupt cop in season 1 before going on this redemption journey.

Did you feel like this would be the right period on his arc?

HENDERSON:I think that’s a huge part of it, and how it weirdly parallels Lucifer.

There is a weird amount in common between Dan and Lucifer.

Ildy, what was it like taking on such a pivotal episode in your directorial debut?

MODROVICH:Right, it wasn’t terrifying at all.

It was quite daunting, but I just had to think of it as each scene as they came.

I couldn’t think about how pivotal it was.

Did you immediately figure out a way to bring him back once it looked like season 6 was happening?

Also, a chance to torture Dan Espinoza for one more season sure sounds like a lot of fun.

So we didn’t change anything.

One of the things I love about TV is you lean into the curveballs and weird zigzags.

Similarly, “Oh, God.

Well, maybe that’s the best story possible.”

MODROVICH:I’ll definitely add that the Dan story was very easy to find.

You guys were getting ready to shoot the finale when everything shut down last spring.

MODROVICH:Well, largely the thing that changed was the location of the big, final battle.

We were going to shoot that at the Mount Wilson Observatory, and a couple of things happened.

HENDERSON:Similar to before, the curveball sometimes helped.

That entire battle sequence in the finale seemed pretty tricky.

Can you talk about how you approached writing that entire sequence and the important beat?

And so we really only wanted to do it when we really could earn it.

What a great opportunity to see John Decker again."

It was more about that moment and their love.

By the time an angel can get there, Dan’s too far gone.

So it was very important to be like, “Dan’s death is permanent.

How early on did you decide you wanted to end the season with Lucifer becoming God?

How much does that missing bit figure into the final season?

How does Lucifer becoming God affect his relationship with Chloe?

When the dog catches the car, what does the dog do with it?

That is a question worth exploring for a season.