Also, if that was a defense mission, who attacked? The alien in the cells?
This is kinda hard to explain, so let me start at the beginning.
On another completely unrelated save, I have a Sectoid Battleship coming in to wipe out my base. I created a backup copy of the LP save, transplanted XBASES.DAT and manually copied the Battleship into the new save, changing the destination as needed. I also changed the Battleship into a Medium Scout, and when the attack happened, I changed three of the four crew into X-COM control. The last one I disarmed and blocked into a closet, before walking the other three to the containment unit and setting up the scene. Then, I changed that guard to Psi Strength 0, disarmed him, changed the last Sectoid into a Leader with Psi Strength and Skill 100, before clicking end turn. That's how I got the "guard is under alien control" screen, and after that, I armed him and shot the other two guards. I moved the X-COM sectoid out of the cell, giving the impression that it was alien (if you look carefully, there's no flashing red box that signifies alien unit spotted). Then, I proceeded to change the sectoid into alien control, allowing Johannes to stun it (no friendly stun allowed with the Stun Rod). Johannes stunned it, Kramer moved over, and I killed the closet leader, ending the mission.
tl;dr : gratuitous savefile hacking