A judge has ruled that the Rosebud Sioux Tribe in South Dakota can move forward on its lawsuit accusing the Indian Health Service of failing to provide adequate medical care to tribal members.

The suit was filed last year after the IHS shut down the emergency room at the Rosebud Hospital, following an investigation by federal inspectors who found serious failures they said were putting patients’ lives at risk. The ER has since reopened.

U.S. District Judge Roberto Lange in a ruling posted Friday rejected the government’s motion to dismiss the case. He cited the 1868 Treaty of Fort Laramie that shows the government promised to provide a physician for the tribe.

The tribe’s attorney, Timothy Purdon, says his clients believe that IHS “violated its trust responsibility” to tribal members.