A woman who killed her kitten by cooking it in a microwave after it attacked her goldfish has been jailed for 14 weeks by a district judge who said it was an "act of utterly horrendous cruelty".

Laura Cunliffe, 23, admitted putting black-and-white Mowgli into the oven and turning it on for five minutes after finding the remains of the fish on the floor, Barnsley magistrates court heard.

Cunliffe said she had rescued it after about a minute, when she realised what she had done, but the kitten died later.

District judge John Foster said he had to jail Cunliffe as a deterrent – a decision that caused outrage among her family in the public gallery.

Foster had been told by Cunliffe's solicitor, Alan Greaves, that his client had longstanding problems with psychotic depression and had been sectioned under the Mental Health Act 20 times.

As the defendant was led away in handcuffs, one member of her family shouted: "She doesn't know what's happening – she hasn't a clue."

Another shouted: "This is a failure of medical services, judge."

Foster told the defendant: "This was an act of utterly horrendous cruelty on your part on an animal that, as far as I could see, had come to trust you and rely on you."

The district judge said Cunliffe's actions were inexplicable.

Cunliffe, of Hoyland, Barnsley, admitted one charge of causing unnecessary suffering to an animal at a previous hearing.

She was banned from keeping animals for life and was told she cannot apply to have this ban reviewed for five years.

Brian Orsborn, prosecuting for the RSPCA, told the court Cunliffe had taken Mowgli to her stepsister's house after the incident in September last year, wrapped in a towel after she attempted to cool it down with water.

Greaves told the court his client was extremely sorry for what she had done and he described it as a "shocking, disturbing and horrendous case". He added: "She still can't believe what she's done."

The solicitor detailed Cunliffe's extensive mental health problems, which he said were a result of a psychotic form of depression. He said she heard voices and believed that things she saw on TV were real.

Greaves said his client had stopped taking her medication because "the Queen had told her not to". He said Cunliffe's actions were all the more inexplicable because she loved animals and had cared for the kitten, which was less than a year old.

He said Cunliffe would carry the animal everywhere with her under her jacket and had "loved it more than anything else".

But when he was pressed by the district judge about whether his client "knew what she was doing", Greaves said: "I'm afraid that's right." He said she "just lost her temper" and acted "totally out of character".

Sentencing Cunliffe, Foster said: "I have concluded, after careful thought, that the utterly barbaric nature of the act that you carried out in relation to this animal does demand a deterrent sentence."

After the case, an RSPCA spokeswoman said: "This was such a sad case and clearly this poor kitten would have suffered terribly over a prolonged period of time. Sentencing is a matter for the courts but we hope that this means that other animals will not have to suffer in this way in future."