A New Jersey judge ruled on Friday that the state must allow same-sex couples to marry, saying that not doing so deprives them of rights that were guaranteed by the United States Supreme Court in June.

It is the first time a court has struck down a state’s refusal to legalize same-sex marriage as a direct result of the Supreme Court ruling, and with lawsuits pending in other states, it could presage other successful challenges across the country.

The decision was a rebuff to Gov. Chris Christie, a Republican who vetoed a bill passed by the Legislature last year that would have allowed same-sex couples to marry. His office said it would appeal to the state’s highest court. And he is likely to seek a stay preventing same-sex marriages from beginning on Oct. 21, as the judge ordered.