Talmud Sanhedrin 74a:19
And conversely, the Torah juxtaposes a betrothed young woman to a murderer to indicate that just as a potential murderer is subject to the halakha that if one were ordered to murder another, he must be killed and not transgress the prohibition of bloodshed, so too, concerning a betrothed young woman, if she is faced with rape, she must be killed and not transgress the prohibition of forbidden sexual relations.