This story takes place at the end of "Star Trek: The Wrath of Khan" and flashes back to some time near the end of "The Conscience of the King." Graphic physical details are included. What happens in canon, has happened here.