A Canadian who plotted terrorist attacks in New York City for the so-called Islamic State said his frustration with the conduct of the United States and its allies had turned him towards “military jihad.”

In a lengthy letter to the U.S. judge sentencing him next month, Abdulrahman El-Bahnasawy described how he came to see terrorism as an acceptable response to “reckless airstrikes” and rejection of the “Islamic system.”

“With airstrikes and bombs they destroyed homes, killed the innocent and terrorized entire populations to make people abide by there [sic] terms and ways, the ways of corruption and enslavement to other than God,” the 20-year-old Mississauga resident wrote.

“Then through there [sic] media they blinded everyone by propagating falsehood and misinformation, that the Islamic System is ‘barbaric’ or ‘terrorists’ or ‘abuse to human rights.’”

Story continues below advertisement

The Kuwait-born Canadian was arrested in New Jersey on May 21, 2016, but his case remained sealed until last Oct. 6. He has pleaded guilty to planning terrorist attacks that were to target Times Square, the New York subway and concert venues. He was 18 at the time.

Two alleged co-conspirators in Pakistan and the Philippines have also been charged. The arrests followed an FBI undercover investigation conducted in co-operation with the RCMP.

“These Americans need an attack … I wanna create the next 9/11,” El-Bahnasawy wrote to a man he thought was a co-conspirator but who was actually working undercover for police.

In this Saturday, July 16, 2016, photo, crowds of visitors linger in New York’s Times Square – one of El Bahnasawyintended targets. AP Photo/William Mathis

The attacks were to occur in June 2016, during the Islamic holy month of Ramadan, U.S. authorities said. El-Bahnasawy had purchased bomb-making materials in Ontario and sent them to the informant.

Story continues below advertisement

Global News has reported that while awaiting sentencing last year, El-Bahnasawy was taking an anti-psychotic drug used to treat symptoms of schizophrenia and bipolar disorder.

Amarnath Amarasingam, a senior research fellow at the Institute for Strategic Dialogue, said the story El-Bahnasawy recounted in his letter was fairly typical of those told by other jihadists.

“All of their past behavior and all the corruption in society is explained by the fact that they themselves and society have deviated from the path of God. Once this truth is established, any threat to it becomes something that must be fought against,” Amarasingam said.

“At the very least, it sounds like he regrets the move he made into violence.”

El-Bahnasawy is to be sentenced on April 9.

On Friday, his lawyers filed a sentencing memorandum in U.S. district court in New York that described him as a socially-isolated youth who had struggled with problems of self-esteem, mental health and addiction.

They said his involvement with extremism occurred during “a pause in treatment and prescribed medications,” when he had stopped attending school and spent hours alone in his room.

Story continues below advertisement

“It was during this period that Abdulrahman encountered extremists online and ultimately undercover federal agents,” the sentencing memorandum reads.

His mother Khadiga Metwally said in a letter included in the submission that her son started smoking marijuana after researching drugs for a school project. She and her husband responded by taking him back to Kuwait.

Despite treatment, he continued to use drugs and in 2014 was admitted to Toronto’s Centre for Addiction and Mental Health for four months, but he relapsed.

She said the family’s only concern was helping him get clean and they never thought about “ISIS ideological stimulation or who may entrap him online, or how many informants are going in competition to hunt him.”

Bottles of Hydrogen peroxide shipped to the US as part of El bahnasawy’s terror plot. Handout

El-Bahnasawy acknowledged using a variety of drugs and said he had tried to commit suicide but that he eventually learned to hate drugs, although he acknowledged relapsing.

Story continues below advertisement

After moving back to Canada when he was 17, he said his parents “forced me to enroll in an Islamic school” although he did not identify as a Muslim. But he said he was happy because it was better than Kuwait and he soon became interested in religion.

“I realized Islam would fix all the problems in society,” he wrote. “This current system which is the rule of the people (or so called democracy and freedom) led men to the enslavement of everything but God, destroying society.”

He also described his view of how “the U.S. and its allies behave towards the Islamic System.”

“I was very frustrated as I seen [sic] the falsehood and terms the U.S. and their allies try to impose, but this led me to military jihad,” he wrote, emphasizing he was not justifying his actions but “merely explaining my thought process at the time.”

His letter avoided details of the terrorist conspiracy but described how he almost walked away from what he called “the plot.” He recalled typing a code that allowed him to talk to the undercover officer who was posing as a fellow terrorist.

“It wouldn’t work,” he wrote. “I remember thinking it was a message from God to just forget about the plot and do something else with my life, but unfortunately, I remembered that I had written it backwards.”

Story continues below advertisement

“I wonder where my life would be if my memory just hadn’t worked that day. Other times I wonder where I would be if the undercover or anyone else I looked up to would have advised me that there are ways other than revenge attacks and violence to oppose corruption.”

He said he was done with violence. He apologized and asked the judge for a second chance. He also urged the judge to “see the truthfulness of Islam and the falsehood of the current system.”

His lawyers said El-Bahnasawy was remorseful and want a sentence that would result in his release when he is in his mid-20s “so he can immerse himself in proper treatment in Canada.”

Stewart.Bell@GlobalNews.ca