OTTAWA -- An Ottawa man who pleaded guilty to a terrorism charge as part of a homegrown conspiracy says he wants to make amends for his mistake.

Hiva Mohammad Alizadeh told a courtroom Wednesday that he did not always subscribe to such an "evil way of thinking" and admitted his actions had hurt his two young children.

"I owe them a lot," he said, noting time behind bars had opened his eyes to the reality of his actions.

In a surprise move, Alizadeh, 34, pleaded guilty to possessing explosives with an intent to do harm.

It means he will not face trial in February for his role in a plan to wage violent jihad in Canada.

Alizadeh is "genuinely interested" in seeking counselling in a federal penitentiary, said his lawyer, Leo Russomanno. "He's truly committed to reforming, to deradicalizing and coming to terms with what is it that led him to that dark place."

Crown lawyer Jason Wakely said while he was pleased to hear Alizadeh's expression of remorse, time will tell whether he can truly shed his radical outlook.

"Curing this sort of ideological misguidance is not an easy task, and it's not necessarily a perfected science."

Alizadeh, a custodian and part-time student, was arrested in August 2010 along with two other men.

Police seized terrorist literature, videos and manuals along with dozens of electronic circuit boards -- devices designed to detonate homemade bombs remotely.

Alizadeh was sentenced to 24 years in prison after entering his plea in Ontario Superior Court, part of a pre-arranged deal.

Justice Colin McKinnon told Alizadeh he will be burdened with an utterly deplorable stigma.

"You are now a convicted terrorist," he said. "You have brought untold shame upon your family, your community and peace-loving Muslims throughout this country."

After accounting for time served -- credited as six years -- Alizadeh faces a maximum of 18 more years behind bars, and he has agreed not to apply for parole for at least nine years.

Two other terrorism-related charges against him have been withdrawn.

Alizadeh, who obtained Canadian citizenship in 2007, was born in Iran, of Kurdish descent. He studied electrical engineering technology at Winnipeg's Red River College before moving to Ottawa.

In an agreed statement of facts, Alizadeh acknowledged travelling to Iran in March 2009 and sneaking across the border into Afghanistan, where he attended a terrorist training camp run by Islamic militants for about two months.

He was trained in the use of firearms, including AK-47s and handguns. He was taught how to assemble remote-controlled improvised explosive devices by an expert bomb-maker known as Westa Omar, who was personally involved in preparation of such devices for use against coalition troops in Afghanistan.

Upon returning to Canada in July 2009, Alizadeh smuggled in 56 customized circuit boards intended to build explosive triggering devices set off by a signal from a cell phone or radio transmitter. He also had a transmitter, tone dialer and other electronic components, along with violent jihadist propaganda videos he intended to upload to YouTube.

Alizadeh used extreme caution in communicating with his foreign terrorist contacts, employing the alias Abdulrahim Kurdi, a library email account in a false name and a pay-as-you-go phone.

Alizadeh set about forming a terrorist cell in Ottawa, using propaganda and persuasion in an effort to radicalize hospital technician Misbahuddin Ahmed, who ultimately agreed to join the group.

Ahmed was convicted in July of two terrorism charges related to the conspiracy. He awaits sentencing.

In February 2010 police covertly searched Alizadeh's home. In a grocery bag in his closet, they discovered the circuit boards and other electronic components. They also found videos on how to make various explosive substances and a terrorist training manual with instructions on building a cell-phone detonator, conducting ambushes, kidnapping Americans and using poisonous gases.

In addition, there were dozens of propaganda videos featuring speeches by al-Qaida leader Osama bin Laden, beheadings, bombings and calls to wage war on infidels.

Alizadeh inquired with his overseas contacts about sending Ahmed for explosives training so he could then return and plot an attack in Canada.

On two occasions, Alizadeh sent a total of $3,400 to his brother in Iran to purchase weapons.

On July 20, 2010, Alizadeh and Ahmed met with Khurram Syed Sher in an attempt to recruit him to their cause. Alizadeh said it was their duty to assist the cause of violent jihad by raising money and sending it overseas, taking paramilitary training, learning how to make explosives, conducting reconnaissance in Canada on possible targets and recruiting others.

Sher, a doctor who once sang on the Canadian Idol TV show, was acquitted last month of conspiring to facilitate terrorism.

During the 2010 meeting, secretly recorded by police, Alizadeh said he would have no trouble arranging terrorist training for members of the group.

"So you're gonna, if Allah wills, start a small thing and, if Allah wills, it will end up to be a big thing if Allah wills in North America," Alizadeh said.

"And our dreams will come true, if Allah wills, that we will break their back in their own country."