While serving on the Texas Supreme Court in the 1990s, Cornyn ruled with the majority to overturn a lower court ruling, "State v. Morales", that had found Texas's anti-sodomy laws to be unconstitutional. During oral arguments, he questioned the merits of the case, asking how gay individuals were harmed by the anti-sodomy laws if those laws were not enforced. According to Yale Law School professor William Eskridge, Cornyn "engineered the "Morales" majority" that saved the sodomy law. When running for the Senate in 2002, Cornyn defended the law. In 2003, the U.S. Supreme Court overturned Texas's sodomy law in "Lawrence v. Texas".