Lawyers for a young Canadian jailed in the U-S for plotting attacks on New York City are appealing his conviction and 40-year sentence.

They say the trial judge violated Abdulrahman El Bahnasawy's rights by denying him the right to a lawyer of his choosing.

They also say the 40-year sentence he was handed was inhumane given his youth, mental-health issues and addictions.

El-Bahnasawy was a 17-year-old living at home in Mississauga, Ontario, when he met an undercover FBI agent online.

The defence argued the agent then encouraged him to plan attacks on the Big Apple, while prosecutors said the plot was well underway before the two connected.

El Bahnasawy was arrested as an 18-year-old on the outskirts of New York in May 2016.