As a judge María Lourdes Afiuni thought courts had the ultimate power to jail people, but as a prisoner in a cramped cell she now believes Venezuela has a higher judicial authority: Hugo Chávez.

The judge has spent a year among murderers and drug traffickers in Los Teques women's jail, just outside the capital, Caracas, and if the Venezuelan president has his way she has another 29 to go.

Afiuni does not doubt her fate lies with Chávez, who demanded her detention after she freed a banker accused of corruption. "There is no judicial independence," she told the Guardian. "I'm here as the president's prisoner. I'm an example to other judges of what happens if you step out of line."

Amnesty International and Human Rights Watch, among others, say the jailing of the 47-year-old single mother is politically motivated and shows how an over-mighty executive has blurred the separation of powers and eroded democracy.

Afiuni's health may intensify scrutiny of her case. She was taken to hospital this week with suggestions her uterus may need to be removed. She was also checked for heart problems.

If disease does not kill Afiuni, a heavy smoker, other prisoners may, not least those she sent to Los Teques. Some have threatened to burn Afiuni with petrol, others to cut off her head and to bathe the jail in her blood.

Her plight has terrified others in the judiciary but none have dared speak out, said Blanca Rosa Mármol de León, a veteran supreme court judge. "Before there was a lot of fear on the bench but now there's panic. In 35 years in the judicial system I've never seen judicial power so submissive."

A report last year by the human rights arm of the Organisation of American States said independent judges had been culled and replaced with government loyalists.

Due to retire next year, Mármol is the only judge to have commented on Afiuni's case. "It's tragic because when the judiciary has no independence or autonomy where is the citizen supposed to go for justice? Our democracy is very diminished."

The prosecutor's office and justice ministry did not reply to interview requests.

Few had heard of Afiuni until 10 December 2009 when she granted bail to Eligio Cedeño, a banker charged with evading currency controls. He had been in jail for almost three years without trial, exceeding legal limits. He fled and is now in the US seeking asylum.

Chávez, who had taken a close interest in the case, was furious. He went on TV the day after the release and said Afiuni was a "bandit" who took a bribe. "This judge should get the maximum penalty … 30 years in prison! That judge has to pay for what she has done."

He told the head of the supreme court that the case should be treated with "firmness". Afiuni was charged with corruption and abuse of power. In May prosecutors said they had found no evidence of illicit payments but accused the judge of "spiritual corruption". There is no trial date.

Government supporters have defended her detention as legitimate given suspicion over the freeing of Cedeño. "Her arrest … was not arbitrary but rather was based on solid evidence of judicial misconduct and abuse," wrote Eva Golinger, editor of the Correo del Orinoco International.

Afiuni, dressed in jeans and a sweater, said she had suspected the Cedeño case would bring trouble but not the drastic consequences.

She is not allowed to leave her cell, ostensibly for safety. She spends her time reading, watching DVDs, doing jigsaws and helping other inmates with court papers passed through a small hole in a steel door. She also tweets to a growing band of 55,590 followers, including the justice minister. When authorities confiscate her BlackBerry – she has gone through nine – supporters supply another one.

The cell, which she has to herself, has a candle, a Virgin Mary statue and a stick under the door to block rodents. Afiuni said she was shocked by conditions. Los Teques's population has tripled to 900 in four years, with five women in cells designed for two.

Prisoners prey on each other for money and sex. Afiuni denounced one gang leader who tried to intimidate her into sex. Prisoners supply mattresses and medicines or go without, and "rent" plastic chairs for visitors. "I knew conditions were tough but didn't realise just how degraded," said Afiuni. "If I was back on the bench I'd find it difficult to send anyone to jail unless the system was changed."

She also rued colleagues' silence, saying: "Occasionally I get a message that so and so sends commiserations but they're afraid to speak out. That makes them cowards and accomplices."