The California prison of Crescent Bay, site of one of the secure housing units that are at the centre of a statewide hunger strike. Photograph: Rich Pedroncelli/AP

Jail officials in California have been given permission to force-feed hunger strikers who are entering their seventh week of a statewide protest against prison conditions. The order strikes out directives recently signed by some prisoners that they be allowed to die.

US District Court Judge Thelton E Henderson, responding to a request by state authorities, ruled that California prison doctors may force-feed selected inmates who are near death, even if they had previously signed orders asking not to be resuscitated.

About 136 California inmates are taking part in a hunger strike that began on 8 July demanding an end to a policy of housing inmates believed to be associated with gangs in near-isolation for years. Up to 69 of the striking inmates have refused food continuously since the strike began.

This is the second time prisoners have launched a hunger strike to protest against the state's practice of housing some inmates for years in its four security housing units.

About 4,500 prisoners were housed in the units when the strike began, officials said. State officials say the units are needed to stem the influence of prison gangs and administrators have characterised the hunger strike as a power grab by gang leaders.

Prior to the judge's decision on Monday, California policy prohibited force-feeding of inmates on a hunger strike if they had signed medical orders refusing resuscitation in the event they lost consciousness or experienced heart failure.

But officials went to court to seek permission to ignore these "do-not-resuscitate" orders for inmates who signed them during the hunger strike or just prior to it, citing concerns about possible coercion. Henderson wrote in his order that in view of those concerns, a directive signed by such inmates would be "deemed not valid".

A lawyer for some of the hunger strikers said she was not aware of inmates being coerced. "They're exaggerating this," said inmate advocate Carol Strickman, adding that the state should not ignore inmates' wishes in such matters of life and death. "As much as I don't want to see anybody die, some people were choosing to sign those requests and some were not."

Joyce Hayhoe, a spokeswoman for the federal receiver in charge of medical care in the prisons, said Monday's request to invalidate the more recent do-not-resuscitate orders was not made on an emergency basis and that no one was force-fed on Monday as a result. "Inmates can deteriorate rather quickly when they have starved themselves for this long period of time so we wanted to make sure we had the order in place ... for us to be able to save their lives," Hayhoe said.

Hayhoe said she had talked to two inmates at Corcoran state prison who refused food or medical care because they were afraid other prisoners would find out if they didn't.

The force-feeding process, which prison officials call "refeeding," could include starting intravenous fluids or putting feeding tubes through the nose and into the stomach.

Jules Lobel, president of the Centre for Constitutional Rights, represents 10 inmates suing to end prolonged solitary confinement at Pelican Bay State Prison. He said force-feeding "violates international law to the extent that it involves somebody who doesn't give their consent".

Lobel said prison officials should look for alternatives, including providing inmates with a liquid diet of fruit and vegetable drinks as they have requested, or negotiating with inmates over their demands.

However Lobel said he would not seek to overturn Henderson's order.

Prison officials said on Monday that inmates were free to consume a liquid diet but would be counted as having ended their hunger strike if they consumed anything more than water, vitamins and electrolytes.

The most high-profile case of force-feeding prisoners has involved several dozen terrorism suspects held at Guantánamo Bay who had nasal tubes inserted.

Other federal judges have turned down bids by the Guantánamo inmates to stop the force-feeding. US District Judge Rosemary M Collyer said in a ruling last month that numerous courts had deemed it the the government's duty to prevent suicide and to provide lifesaving nutritional and medical care to people in custody.

California keeps about 3,600 inmates in what are known as security housing units, some because of crimes they committed in prison and others for indefinite terms if they are determined to be leaders of prison gangs.