NEW YORK (AP) — A federal lawsuit Wednesday demanded public access to a small uninhabited island off New York City where the remains of about a million people who were poor or unknown are buried.

The lawsuit claimed Hart Island, a part of the Bronx, is run like a prison by New York City's Department of Correction, which uses prisoners sometimes to bury the indigent and bodies that go unclaimed. It said relatives are unable to visit gravesites.

The lawsuit was filed in Manhattan by the New York Civil Liberties Union on behalf of relatives of those buried on the mile-long and quarter-mile-wide island. With three named plaintiffs, it seeks class-action status and claims constitutional rights were violated.

"To run the burial grounds of the city's poor as a prison compound and to bar family members from visiting the gravesites of their loved ones is disgraceful and heartless," said Christopher Dunn, the NYCLU's associate legal director. "Through this lawsuit, we expect to make Hart Island into the sacred and open place it should be."

City attorney Jonathan Pines said the city was reviewing the lawsuit.

In a statement, the Department of Correction said it lets families and others visit a specially designated space in the cemetery to pay respects.

"While the cemetery on Hart Island lacks the infrastructure to safely accommodate large numbers of visitors or to allow them to wander about the grounds, we continue to explore ways to meet requests of relatives seeking greater access to honor those buried on the island," the statement said.

The suit described the island's cemetery as the largest indigent burial ground in the United States, one of the nation's largest cemeteries and the largest taxpayer-funded cemetery in the world.

It said the city's policy barring gravesite visitation clashed with long-running traditions in the U.S. and the world of letting family members honor the dead as they see fit. The suit said the policy also violated the right to free exercise of religion.

The lawsuit acknowledged that the city describes Hart Island as open to the public, but the Department of Correction makes it almost impossible to make it onto a ferry that infrequently travels there.

"And for those able to navigate the department's process and get to the island, they are not allowed to go beyond a small area near the dock from which there is no view of the burial grounds," the lawsuit said.