My regrets, by magistrate who jailed 12-year-old girl
Civil liberties campaigners on the Isle of Man have promised to take the case of the girl, who had not been convicted of any offence and suffers from spina bifida, to the United Nations Committee on the Rights of the Child.
Mr Hartley said the girl, who lived in a children's' home, was considered a danger to herself and others.
He said: "I told her that she could be granted bail if she continued to live at the children's home and did not go out unaccompanied. The girl refused to accept these conditions and so I was left with no alternative.
"I have three children and many grandchildren - including a grandson the same age as the girl - and I did not take the decision to send her to the juvenile unit lightly."
The girl is being kept in a cell at special annexe of the prison inside the perimeter wall of Victoria Road Prison in Douglas. She is kept away from adult inmates but can associate with offenders aged up to 16.
A 15-year-old youth is at the same jail where he is thought to be serving a six-month sentence for assault and theft. A 14-year-old boy awaiting trial was released a few days ago when his parents agreed to take care of him.
A Manx advocate, Terence McDonald, has called for the island's government to carry out urgent reforms. "It is barbaric to lock up children in jail and place them in cells," he said.
Mr Hartley, a member of the prison board, said: "It is a modern unit, with specially trained staff and I believe the girl will receive the care she needs."
The girl, who is not being named, first appeared before Mr Hartley on Tuesday charged with assault and criminal damage. He said: "The police requested a remand in custody and it was considered the girl was in moral danger as she tended to go missing for lengthy periods and the staff at the children's home could not control her."
- 2 Qataris pledge to expand Canary Wharf
- 3 #JeSuisEd: People share photos of themselves eating awkwardly in solidarity with Labour leader
- 4 Women think Irish men are the sexiest, survey finds
- 5 Florida couple forced to register as sex offenders for having sex on public beach
#JeSuisEd: People share photos of themselves eating awkwardly in solidarity with Labour leader
Florida couple forced to register as sex offenders for having sex on public beach
UK election candidates: 'Nasty party' Ukip faces fresh questions on eve of vote
Who should I vote for in the general election? Take The Independent's interactive quiz to find out which party's the right choice for you
Ohio 'Shawshank Redemption' fugitive Frank Freshwater arrested after 56 years on the run
In defence of liberal democracy
General Election 2015: Post-election 'shambles' looms as 70 per cent of voters say SNP 'should not be able to veto UK government policies'
The Rothschild Libel: Why has it taken 200 years for an anti-Semitic slur that emerged from the Battle of Waterloo to be dismissed?
General Election 2015: UK will be 'run for the wealthy and powerful' if Tories retain power, Labour warns
General election live: SNP suspends two members for disrupting Labour rally
General election live: Booths open at 7am across the country on polling day
£35000 - £40000 per annum + car and benefits: Ashdown Group: Marketing Manager...
£18000 - £20000 per annum: Ashdown Group: Helpdesk Analyst - Devon - £20,000 ...
£35000 - £50000 per annum + generous bonus: Ashdown Group: Business Analytics ...
£45000 - £50000 per annum: Ashdown Group: IT Project Coordinator (Software Dev...