The Supreme Court agreed yesterday to hear a Texas gay couple's challenge to that state's ban on homosexual sodomy, setting the stage for what could be a landmark ruling on gay rights.

The question of whether states may criminalize private consensual sexual conduct between members of the same sex had apparently been settled in 1986, when the court ruled 5 to 4 that the Constitution permitted Georgia to punish a gay man for violating its sodomy statute.

But yesterday's announcement by the court, whose personnel has changed considerably since 1986, appears to suggest interest by at least some justices in reassessing that ruling. In their appeal petition, lawyers for the Texas couple specifically urged the court to overturn the 1986 decision, which held that the right to privacy did not include a right to homosexual sex.

The number of states with sodomy laws that apply to all people has declined from 24 to 13 since 1986, and only four states -- Kansas, Oklahoma and Missouri, in addition to Texas -- have laws that criminalize only homosexual sex. But both proponents and opponents of the Texas law are treating the case as one of potentially major significance.

"We applaud the Supreme Court's decision and we hope this is the beginning of the end to an unfortunate chapter of singling out gay and lesbian people for state-sanctioned persecution," said Kevin Layton, general counsel and legal director of the Human Rights Campaign, a gay rights group.

"Petitioners are attempting to force this country to condone homosexual relationships and to create a universal right, based on those relationships, which has never been recognized in the Constitutional history of the United States," attorneys for the Pro Family Law Center, which is associated with California-based Abiding Truth Ministries, wrote in a friend-of-the-court brief urging the court to refuse the appeal.

The court agreed to hear the case of John Geddes Lawrence and Tyron Garner, who were arrested in 1998 by sheriff's deputies in Harris County, Tex., who came to their apartment in response to a false report of "an armed man going crazy," and found the men engaged in anal sex. They were charged with deviate sexual intercourse, convicted and fined $200.

The two men argue that Texas's enforcement of its Homosexual Conduct Law violates their right to privacy and their constitutional right to equal treatment by the state -- because it penalizes certain private sex acts when they are committed by same-sex couples, but not by heterosexuals.

But a state appeals court, relying in part on the U.S. Supreme Court's 1986 ruling, rejected their arguments, saying that there was no fundamental right to homosexual conduct and that the state legislature had passed the law based on its rational belief that homosexuality is immoral.

Gay rights advocates say that logic paves the way for disparate treatment that can cost gays jobs and income, because those convicted of homosexual sodomy in Texas are guilty of a "crime of moral turpitude" that could disqualify them from certain professions.

"This discriminatory criminalization tears at gay relationships and stigmatizes loving behavior that others can engage in without the brand of 'lawbreaker,' " attorneys from the Lambda Legal Defense and Education Fund, a New York-based gay rights organization, told the court in their appeal petition. "The law sends a powerful signal from the State condemning homosexuals. Not surprisingly, then, it is also used to justify discrimination against gay men and lesbians in parenting, employment, access to civil rights laws, and many other aspects of everyday life."

But Harris County, represented by District Attorney Charles A. Rosenthal, argued in its brief to the court that "[morality] is a fluid concept, and public opinion regarding moral issues may change over time, but what has not changed is the understanding that government may require adherence to certain widely accepted moral standards and sanction deviation from those standards, so long as it does not interfere with constitutionally protected liberties."

The Supreme Court has sent somewhat mixed signals on gay rights in recent cases.

In 1996, the court, by a 6 to 3 vote, struck down a Colorado law, approved by referendum, that would have prohibited "all legislative, executive, or judicial action at any level of state or local government designed to protect the status" of gays.

Writing for the court, Justice Anthony M. Kennedy, who had not yet joined the court in 1986, noted that the law reflected little more than a popular "animus" against gays.

But in 2000, the court, with Kennedy joining a 5-4 majority, held that the Boy Scouts of America could ban gay scoutmasters because the group has a right to define its own criteria for membership.

The case is Lawrence v. Texas, No. 02-102. Oral argument will take place in March, and a decision is expected by July.