Former national ski coach Bertrand Charest may have had a trial, but he was not judged according to the law, his lawyer argued before the Court of Appeal Tuesday.

Charest is challenging his guilty verdict and the sentence he received for sexual offences against young skiers.

The Crown countered that the 12-year sentence he received was fitting, considering the seriousness of his crimes.

In June 2017, Judge Sylvain Lepine of Quebec court found Charest guilty of 37 counts of a sexual nature committed in the 1990s on nine athletes.

He had complete sexual relations with some of the teenage victims while he was in a position of authority over them. One of them became pregnant, and Charest took her to have an abortion.

Charest's lawyer, Louis Belleau, said the lower court ruling was riddled with errors. He even spoke of a "dysfunctional" justice system.

"The trial judge erred on very serious matters, and this affects the validity of the judgment," the prosecutor told reporters after the hearing.

He gave the example of Lepine's conclusions on sexual assault. "There are mistakes about how to analyze consent," he said. "This is a fundamental question. Some of the complainants said in court that they consented to sex, so it was necessary to analyze whether that consent was valid or not."

The Crown argued that the young athletes were manipulated and controlled, leading them to agree to sex. Their consent resulted from a breach of trust or abuse of authority, Alexis Marcotte Belanger said.

Even before the Court of Appeal hearing on Tuesday, the Crown had conceded that 20 of the 37 counts on which Charest was convicted should be dropped. The reasons included a lack of evidence on some counts and a lack of jurisdiction in the case of an assault that occurred in New Zealand.

Marcotte Belanger said the number of concessions seems important but the "the overall picture" of what Mr. Charest did is unchanged.

Belleau countered that if the 20 counts are withdrawn, it should necessarily lead to a reduced sentence.

The Court of Appeal took the case under advisement and will make its decision known later.

Charest has spent about four years in prison since his arrest in 2015. He was released in March, pending the outcome of his appeal.