This episode was originally entitled "Eclipse", following on from Penumbra (1999) (an area of half shadow), and "Umbra" (an area of deep shadow).
During the composition of this episode, Ronald D. Moore's wife went into labor a month earlier than expected, and Moore had to take a week off. This threw the writing schedule into chaos, and forced Ira Steven Behr and Hans Beimler (who were working on The Changing Face of Evil (1999)) and René Echevarria (who was working on Penumbra (1999)) to abandon their own episodes and complete the writing of this one.
Damar's comment that Worf and Ezri's execution sentence has been determined before their trial begins is a reference to the Cardassian justice system that was established in The Maquis, Part II (1994) and Tribunal (1994).
The scene between Sisko and Martok where they discuss marriage as a battle was added, at least in part, to help pad out the run time when the episode was running short. Nevertheless, several scenes were scripted and/or filmed that did not make the final cut for broadcast, including two featuring Kasidy Yates and one featuring Miles O'Brien.