A person who contends that a state judicial contempt proceeding violates his federal civil rights must seek relief in state courts if they are an available forum, the Supreme Court ruled yesterday.

The court reversed, 6 to 3, a panel of three federal judges who had ruled a New York State law unconstitutional on its face, partly on the ground that it allows debtors to be jailed without a hearing.

The majority did not reach the constitutional issue. It based the reversal on "comity," the doctrine that the national government fares best by leaving the states free to perform their separate functions in their own ways.

In previous decisions, the court has applied comity to a criminal prosecution and to the closing of theaters showing allegedly obscene films. Yesterday's opinion, written by Justice William H. Rehnquist, extends the doctrine to a state civil proceeding.

Dissenger William J. Brennan Jr., joined by Thurgood Marshall, said the decision is one in a series that use comity and federalism as "covers for the ultimate goal": to close the federal courts in all cases were a state court "may hear the federal plaintiff's federal claims."

The dissenters accused the majority of a "plain refusal" to enforce an 1871 law making the federal judiciary the forum for vindicating and enforcing federal rights threatened by state executive, legislativ, "or judicial" actions.