CONCORD, N.H. — The New Hampshire Supreme Court ruled Thursday that eliminating the distinction between “residency” and “domicile” for voting purposes would be constitutional, siding with Republicans who argue that out-of-state college students who vote here should be subject to the same requirements as everyone else.

Current law allows college students and others who consider the state their domicile to vote without being subject to residency requirements, such as getting a New Hampshire driver’s license or registering their cars. Lawmakers passed a bill this year to align the definitions of domicile and residency, but Republican Gov. Chris Sununu asked the court in May for an advisory opinion on its constitutionality.

Sununu, who previously said he opposed the bill, said in a statement, “We appreciate the time and consideration given to this matter by the New Hampshire Supreme Court and are reviewing their decision.”

In the ruling, Justices Gary Hicks and James Bassett declined to answer, saying they couldn’t evaluate the conflicting claims about the bill without each side presenting evidence. The three others said nothing in the Constitution requires the state to give college students special status, and that those who consider their connection to New Hampshire strong enough to vote in the state “may constitutionally be expected to demonstrate such commitment” by getting licenses and registering their cars.

“Indeed, because driving is ubiquitous and because every state regulates this activity, obtaining an in-state driver’s license and registering one’s vehicle in the state are universally recognized as important indicators that a person does in fact have his or her domicile in that state,” wrote Justices Robert Lynn, Anna Barbara Hantz Marconi and Patrick Donovan. The latter two were nominated by Sununu within the last year. Lynn was appointed by a Democrat in 2010 but was nominated as chief justice by Sununu in April.

Republicans argue the proposed bill clears up confusion and is necessary to ensure fairness, while Democrats argue it amounts to a poll tax and would deter students from voting. In its ruling, the court said even if removing the distinction between residency and domicile creates a burden on them, the state has a compelling reason for making the change.

“The Supreme Court and other courts have repeatedly emphasized that insuring that those who are permitted to vote are bona fide residents who share a community of interest with other citizens of the jurisdiction is a legitimate concern of the highest order,” they wrote. “Insuring a community of interest among voters and residents promotes confidence in political outcomes and guards against a distortion of the political community.”

Republicans called the decision a victory for New Hampshire voters.

“This legislation guarantees all voters the same and appropriate level of fairness that has been missing in our elections,” said Republican state Sen. Jeb Bradley, of Wolfeboro. “The intent of this legislation has never been to disenfranchise anyone from voting in the state of New Hampshire.”

Democrats said deeming a bill constitutional doesn’t mean it should become law.

“The New Hampshire Supreme Court has a long tradition of staying above the political fray, unlike the often polarized United State Supreme Court,” said state Sen. Dan Feltes. “Without a factual record to base a decision, it could have done what it did in 2015 when reviewing very similar legislation — stayed out of the political fray. That would have been the New Hampshire way.”

In January, Deputy Secretary of State David Scanlan spoke in favor of the bill. He emphasized that neighboring states require those who vote in their states to become residents, subject to motor vehicle and other laws.

“Just being domiciled here and not being a resident is an absurd result,” he said.