Also known as just "following the law." You could also say you had no choice but to not rape someone or risk being tortured.