The writers had already made Keiko pregnant. Then Nana comes up and announces that she's pregnant, and the writers were in a pickle. One of the writers was talking to his wife one night about this problem, and she said, "It's simple. Just take the baby out of Keiko and put it in kira."
And that's what they did. The DS9 companion tells the story better than I can.