HONOLULU (AP) _ A state judge Tuesday barred Hawaii from denying marriage licenses to gay couples, a decision certain to be appealed.

The first word of the decision by Circuit Judge Kevin Chang came from Kirk Cashmere, an attorney for three gay couples who sued the state.

An appeal by the state would send the case back to the Hawaii Supreme Court. It ruled in 1993 that denial of marriage licenses to same-sex couples amounted to gender discrimination under the state constitution's Equal Rights Amendment. But it sent the case back to a lower court to give the state a chance to show a compelling public interest in allowing such discrimination.

Copies of Chang's ruling were to be distributed later Tuesday.

Chang ``in a nutshell ruled that the sex-based classification in the state's marriage law is unconstitutional,'' Cashmere said.

The judge said the state had not shown any compelling state interest to deny gay and lesbian couples the right to marry, the attorney said.

Two gay men and two lesbian couples sued in 1991 for the right to marry, to the dismay of some national gay rights organizations that feared backlash from a legal move some considered premature.

The Hawaii case prompted Congress to approve a law President Clinton signed in September, saying the federal government will not recognize gay marriages, and allowing states not to recognize such marriages licensed in other states.

If the Hawaii ruling is upheld, gay activists would then sue to overturn the national law, called the Defense of Marriage Act, said David Smith, spokesman for the Human Rights Campaign, a gay rights group based in Washington, D.C.

``This is a tremendous victory, but the battle's not over. A major bridge has been crossed, but the battle will continue,'' Smith said.

Chang ``made the only decision that he could, given the evidence in this case,'' said Daniel Foley, also an attorney for the three couples who sued when they were denied marriage licenses in 1991. ``This decision is not only historic, but of vital personal consequence to the couples who want to get married.''

Rick Eichor, the deputy state attorney general who handled the state's case, was not immediately available for comment.

Both sides had said they would appeal if Chang ruled against them.

The 1993 state Supreme Court decision ordered the state to show a compelling public interest in refusing to allow marriage between couples of the same sex. The state then argued during a two-week trial in September that the welfare of Hawaii's children was at stake.

Eichor argued that Hawaii's marriage law is intended to promote the best environment for the procreation and rearing of children who thrive best when raised by biological parents. He also contended that legalizing same-sex marriages would open the door to demands that the state also license bigamy, polygamy and consensual incestuous relationships.

The trial featured conflicting testimony from a parade of expert witnesses on family and child development.

State lawmakers failed to agree this year on either a proposed constitutional amendment to ban gay marriages, or domestic partnership legislation giving gay and lesbian couples many of the legal and financial benefits of married couples.

Genora Dancel, who sued along with partner Ninia Baehr, said the Hawaii case is a prelude to national acton.

``Many people around the country helped break through this wall of discrimination,'' she told a New York City news conference organized by the Lambda Legal Defense and Education fund. ``While we face much more work ahead to secure this right nationally, Ninia and I are deeply honored to be part of today's victory.''