One-fourth of the names on Maryland's sex offender registry could be removed after the state's top court expanded Monday on an earlier ruling that adding offenders from before the list was created violated the state constitution.

The Court of Appeals declared last year that the state could not require the registration of people who committed their crimes before October 1995, when the database was established. State officials removed the one name in question in that case but maintained that federal law required them to keep older cases in the database.

On Monday, the judges ruled in that case and another one that federal law doesn't override the state constitution.

"Where we have declared the retroactive application of Maryland's sex offender registry to be unconstitutional, the State must remove [the men's] information from the registry," Judge Clayton Greene Jr. wrote for the court.

Those who say the registries are punitive and do little to protect future victims hailed the ruling, but victims' advocates expressed disappointment. They see the registry as a useful tool to alert families to potential predators in their midst

As many as 1,800 of the state's 8,000 registered sex offenders could be affected by the decisions, and other cases are pending that could expand the number of people whose names are scrubbed.

Maryland requires people convicted of certain sex crimes to register for 15 years, 25 years or for life, depending on the severity of their conviction, and publishes a searchable online database of those on the list.

Lisae C. Jordan, the executive director of the Maryland Coalition Against Sexual Assault, said the ruling means Maryland will now need to look at other ways to track dangerous offenders.

"We cannot rely on the registry," she said. "We need to take other steps."

Nancy S. Forster, an attorney who argued the cases on behalf of the two men, said the court made clear that its decision should apply to anyone who was required to add their names to the registry even though their crimes took place before its creation.

She pointed to language in Greene's ruling, noting that the constitutional issue applies not just to the men who had sued but also "individuals similarly situated in Maryland."

"I believe this means that the state absolutely must remove these people automatically, without each individual having to go to court seeking removal," she said. "If the state does not remove them automatically, I will contemplate the need for a lawsuit."

David Paulson, a spokesman for the Maryland attorney general's office, said the state's lawyers will review the decision before offering legal advice to the Department of Public Safety and Correctional Services, which manages the list.

The state's high court was considering challenges brought by two men, who are identified in court records as John Doe and John Roe.

Doe is Robert Merle Haines Jr., a former teacher who pleaded guilty in 2006 to a single court of child sexual abuse for a 1984 incident involving a 13-year-old student. John Roe has not been identified, but according to court records he was convicted of third-degree sex offense in 1997 for conduct involving a 14-year-old victim.

The ruling last year was on Haines' case alone. It examined state laws from 2009 and 2010 that made registering a requirement even for those convicted before the creation of the database.

The court ruled that requiring people to go back and register amounted to punishing them twice, a violation of the state's constitution.

After losing that case, officials reluctantly agreed to remove Haines from the registry but vowed to keep on fighting.

They took the fight back to court, after a trial court judge ordered the removal of Haines' name from state and federal databases, and argued that federal law required that they keep the offenders' names on the list.

The Court of Appeals rejected that view.