A depressed woman set fire to her flat in what she described as a cry for help.
Police were quickly on the scene because Vicky Clark rang an acquaintance to say what she was going to do.
Two police officers used a fire extinguisher on the landing of the property to put out the fire, Teesside Crown Court heard.
"Ms Clark was occupying a flat on the top floor of a building in Church Street in Hartlepool," said Harry Hadfield, prosecuting.
"At about 3.15pm, police received a call from a concerned person to say they feared a fire might be about to be set in the property.
"Officers were quickly on the scene, and as they made their way up the stairs to the top floor they could hear a smoke alarm.
"On entering the flat they found a blanket on fire on the floor, and the defendant sitting on the bed.
"There was smoke in the flat which officers were able to ventilate by opening a window.
"The damage caused was relatively minor, the landlord later estimated it would cost about £300 to repair."
Clark told police she hoped the smoke would kill her, the court heard.
"She was very distressed saying the fire was a cry for help," said Mr Hadfield.
"She said her mother wouldn't let her see her children, and she had started the fire deliberately to end her own life."
Clark, 28, of Church Street, Hartlepool, admitted arson being reckless as to whether life would be endangered on January 23.
She has previous convictions for threatening to damage property and for being drunk and disorderly.
Andrew Teate, defending, said in mitigation: "Ms Clark was frank with the police, and she pleaded guilty at the first opportunity.
"A report from her psychiatrist suggests she will respond to treatment.
"Ms Clark has engaged with mental health services, and she is getting on better with the mother.
"She is now having her children all day on a Saturday, it is hoped this contact can increase."
The Recorder, Mr Paul Reid, sentenced Clark to a community order of two years, including 30 rehabilitation activity days.
"The reports about you make saddening reading," the recorder told Clark.
"I agree with the assessment that you are unlikely to offend in this way again.
"This was an appalling thing to do, but I think you appreciate that.
"Ordinarily, offences of this type would be met with a sentence of immediate imprisonment.
"The sentence you have received is an opportunity - do not squander it."