SEATTLE — A federal judge has ordered the Washington Department of Corrections to provide nighttime meals to all Muslim inmates who have been fasting during the month of Ramadan, after several said prison officials refused to do so.

The Council on American-Islamic Relations sued the department Sunday on behalf of four prisoners at the Washington State Reformatory in Monroe, saying the men had lost an average of more than 20 pounds ( about 9 kilograms) since Ramadan began in mid-May.

U.S. District Judge Ronald Leighton in Tacoma issued his order just hours after the lawsuit was filed, echoing a similar ruling from a federal judge in Alaska last month.

"Muslim inmates have been starved and their health is in danger as a result of the Monroe Correctional Complex's shameful starvation policy," Lena Masri, CAIR's national litigation director, said in a news release. "We welcome the federal court's swift intervention, which will bring this health crisis to an end and ensure that Muslim inmates are not starved and brutalized for practicing the fundamental principles of their faith."

Ramadan is the ninth month of the Islamic calendar. Muslims observe it by fasting — neither eating nor drinking — between dawn and sunset.

The lawsuit said the prison's policy was generally to require inmates to sign up for Ramadan meals by the end of January, with those who failed to do so allowed to receive the meals at the discretion of prison chaplains. Some said they tried to get the food, only to find out after Ramadan began that they weren't on the list to receive nighttime meals.

Jeremy Livingston, who is serving 22 months for hit-and-run and vehicular assault, said he entered the prison in March, after the deadline, and was denied Ramadan meals despite requesting them upon arrival.

"The Washington Department of Corrections takes very seriously the health and welfare of those sentenced to incarceration in the state's correctional facilities and was immediately responsive to the court order," Corrections spokesman Jeremy Barclay said in an email Monday.

One of the plaintiffs, Naim Lao, who is serving three years for vehicular homicide, said he was added to the list and began receiving Ramadan meals after eight days — but not before he lost 14 pounds (6.4 kilograms), became ill and had guards threaten to force-feed him.

Some of the inmates said they had been able to hide breakfast trays in their cell, but that the trays had occasionally been discovered and confiscated. They also said some prisoners who were on the Ramadan list had tried to share their own nighttime meals with them, but that food too had sometimes been seized.

Leighton said the prisoners had shown that the department was likely violating their constitutional right to be free from cruel and unusual punishment, as well as federal law concerning inmates' rights to free exercise of religion.

Last month, the Council on American-Islamic Relations sued Alaska prison officials on behalf of two Muslim inmates, arguing that bagged meals the men received each evening were inadequate or inappropriately contained pork, which Muslims do not eat. The meals ranged from about 500 to 1,100 calories, when health guidelines suggest 2,600 to 2,800 calories per day.

U.S. District Judge H. Russel Holland said in a written order that fasting Muslim inmates must be given daily meals containing at least 2,600 calories.

Ramadan ends Friday.