The Supreme Court had previously held, in Vinson v. Meritor Savings Bank in 1986, that sexual harassment of women in the workplace could constitute sex discrimination in violation of Title VII of the Civil Rights Act of 1964, a U.S federal civil rights law. In the Oncale case, the Supreme Court held that this rule also could apply to same-sex harassment, as long as it could be proved that the harassment was "because of sex."
The application of the Oncale case has caused some difficulty in the lower federal courts, which have struggled with how to determine whether any particular case of same-sex harassment is "because of sex." In particular, courts have struggled with how to deal with harassment that appears to be based on actual or perceived sexual orientation, because employment discrimination based on sexual orientation is not forbidden by U.S. federal law. (See gay rights.)