A man stole a car to try to escape an unsafe situation, his lawyer said.
Andrew Ormond Brown had been in touch with his ex-partner in Palmerston North and tried to get custody of his child, defence lawyer Jamie Waugh told Whanganui District Court on Tuesday.
"She spoke to some associates of hers," Mr Waugh said. "He felt unsafe.
"He was trying to get away from Palmerston North and get back to a place where he felt supported and safe."
That place was Brown's parents' home in Hamilton, though he only made it as far as Waiouru before stealing $70.10 of petrol and getting caught by police.
Judge David Cameron said Brown entered an unlocked house overnight on June 28-29 and took clothing, a laptop, and the keys to a Ford Mondeo.
Brown took the car to Z petrol station in Waiouru and filled up with petrol, driving off without paying. Police stopped Brown on State Highway 49.
"The items which he had stolen along with the vehicle were found in the vehicle," Judge Cameron said.
Mr Waugh said Brown had a history of burglary and on the most recent he was sentenced to prison in 2011. After being released Brown "returned to old habits".
"Mr Brown would like to bring things to an end," he said.
Judge Cameron said Brown had an "extensive" criminal history from 2002-2013, "full of convictions for dishonesty offending including many previous burglaries for which he's received respective terms of imprisonment".
Brown pleaded guilty to theft and burglary for the latest offending. He was sentenced to nine months' jail and ordered to pay $70.10 for the petrol.
Judge Cameron said he was a "recidivist burglar and will be treated as such".
"Mr Waugh has outlined personal difficulties experienced by the defendant following his release from prison, having served a term for those most recent burglaries.
"He advises the court that the defendant has an ex partner and a child in Palmerston North and there were issues in relation to his access to the child.
"The situation got out of control, resulting in the defendant being fearful for his safety should he remain in Palmerston North. He left following, effectively, threats from others. None of this excuses his behaviour."