When a man whom the law requires to be compelled to divorce his wife does not desire to divorce her, the court should have him beaten until he consents, at which time they should have a get written. The get is acceptable. This applies at all times and in all places.
Similarly, if gentiles beat him while telling him: "Do what the Jews are telling you to do," and the Jews have the gentiles apply pressure on him until [he consents] to divorce his wife, the divorce is acceptable. If, however, the gentiles compel him to write [a get] on their own initiative, the get is [merely] unacceptable.The rationale is that the law requires him to give a divorce.
Why is this get not void? For he is being compelled - either by Jews or by gentiles - [to divorce] against his will [and a get must be given voluntarily].
Because the concept of being compelled against one's will applies only when speaking about a person who is being compelled and forced to do something that the Torah does not obligate him to do - e.g., a person who was beaten until he consented to a sale, or to give a present. If, however, a person's evil inclination presses him to negate [the observance of] a mitzvah or to commit a transgression, and he was beaten until he performed the action he was obligated to perform, or he dissociated himself from the forbidden action, he is not considered to have been forced against his will. On the contrary, it is he himself who is forcing [his own conduct to become debased].
With regard to this person who [outwardly] refuses to divorce [his wife] - he wants to be part of the Jewish people, and he wants to perform all the mitzvot and eschew all the transgressions; it is only his evil inclination that presses him. Therefore, when he is beaten until his [evil] inclination has been weakened, and he consents [to the divorce], he is considered to have performed the divorce willfully.
[Different laws apply when] the law does not require him to divorce his wife, and a Jewish court or simple people compel him to divorce her. This get is deemed unacceptable. Since, however, it was Jews who compelled him, he [is advised] to complete the divorce [in a proper manner]. If, by contrast, gentiles compel him to divorce when it was not required, the divorce is void. Even though he tells the gentiles that he consented and tells the Jews to write and sign [a get], since the law does not require him to divorce, and he was compelled to do so by gentiles, the get is void.