The man who abducted three-year-old Sparwood toddler Kienan Hebert from his southeastern B.C. home last fall told a court in Cranbrook that he abducted the boy to get even with the justice system.

Randall Hopley has already pleaded guilty to abducting a person under the age of 14 and breaking and entering with intent to commit an indictable offence.

Hopley admitted he was fresh out of jail for another attempted abduction of a boy when he snatched Kienan.

"I did this out of protest to the RCMP, Judge Webb and my lawyer," he said, referring to the earlier conviction in 2007.

He said he'd gone looking for another boy to abduct, going door to door in an affluent Sparwood suburb until he found an open door at the Hebert home.

Hopley took Kienan to an abandoned home across the Alberta border where he had hooked up power, bringing a television, and videos for the boy to watch as well as a teddy bear.

While the massive manhunt was in full swing, Hopley slipped away from his hideout and posted on Facebook that he was "sorry, sorry, sorry" for abducting Kienan and that he had not harmed the boy.

Kienan said the same thing when interviewed by police later, telling investigators that he and Hopley had played games during those four days.

Hopley also posted on Facebook that Kienan kept his spirits up and was always laughing, playing and smiling, but he told the court he eventually decided to return the boy after he asked to go home.

The court also heard a call by Hopley to 911 in which he told the dispatcher that Kienan Hebert had been returned home unharmed.

The court then heard Hopley’s six-hour confession to police.

'I did not sexually assault your child'

After his arrest, Hopley told officers he planned the abduction a couple of days in advance. He said he chose the Hebert home because the door was unlocked, it was in a remote new neighbourhood, and "it was easy to tell" there were children inside because of the number of toys outside.

He originally walked into the home at 1:30 a.m. and entered a room shared by Kienan and his six-year-old brother, Caleb, who has had three heart surgeries. He saw a photo of Caleb with a note written underneath that referred to the surgery.

"I thought, 'No. If I do grab him, the kid could get startled and have a heart attack,"' Hopley told a police officer in a video confession.

"You could end up with a dying child, a dead child. So I went out for an hour's walk and later came back and took Kienan out."

Hopley said he was worried that he might have grabbed the wrong child, so he checked Kienan's chest for heart surgery scars.

"When I grabbed Kienan, I basically bolted with him," said Hopley during the interview.

"He was so heavy, he was like a brick. It wore me out in less than half a block and then he started crying that his feet were cold."

Hopely returned the boy after four days.

"He was always playing ... always laughing and smiling. ... I did not harm him in any way possible.

"I brought back their son because he asked to go home."

Included in the video was a face-to-face meeting between Hopley and Kienan's father Paul Hebert.

"Thank you for bringing him back," said Hebert.

Hopley replied: "I did not sexually assault your child whatsoever. It is nothing to do with your family. It makes me upset I did something so stupid."

The sentencing hearing is expected to last two days, but it's not clear if Hopley will be sentenced when the hearing wraps up or if the judge will reserve his decision.

It is expected that the Crown may also ask the court to declare Hopley a dangerous offender because of his prior history of sexual deviance and abduction, meaning he could serve an indefinite prison sentence.

Before Hopley appeared in B.C. Supreme Court he also appeared in provincial court on Wednesday morning to deal with unrelated charges of breaking and entering and possession of stolen goods over $5,000, relating to an Alberta incident.

His lawyer asked to have those charges transferred immediately to B.C. Supreme Court, where he will then plead guilty to all the charges in both incidents and have the cases settled at the same time.

Massive manhunt for Hopley

Hopley was the subject of one of the largest manhunts in B.C. and Alberta history last September after Kienan Hebert was snatched from his home in the middle of the night.

hi-bc-120326-hopley-hiebert-4col

Randall Hopley has pleaded guilty to the abduction of Sparwood toddler Kienan Hebert last fall. (RCMP)

But then in a bizarre sequence of events, Hopley returned the child to his home unharmed four days later in the middle of the night and then disappeared once again, despite the massive police presence in the area.

Hopley was arrested less than two days later in a remote cabin in a ghost town near Crowsnest Pass just across the B.C.-Alberta boundary, following an intense search.

In November, Hopley was declared mentally fit to stand trial following a psychiatric evaluation.

With files from the CBC's Bob Keating, Bryan Labby, The Canadian Press