Yiyan Xie will spend his remaining time in Canada as a prisoner.

The Waterloo resident and international student was sentenced Friday to seven years in custody for the attempted murder of his ex-girlfriend.

Justice Gary Hearn called the knife attack, which played out in a wooded area near Quiet Place, a “terrifying and brutal” attempted murder-suicide plot.

"This was not a spur of the moment action, he had many opportunities to step back and reconsider but he did not,” Hearn said.

On an afternoon in September 2013, court heard, Xie dragged Yi Yang Hao into the woods and lunged at her with a knife.

He then put the knife up to his own throat.

Hao pulled it away, court heard, and called 911. She then tried to stop Xie’s bleeding.

With credit for time already served, Xie will spend about five years in prison – after which, he will be sent back to his home country of China.

Xie’s trial heard concerns that, because he killed a fellow Chinese national, he could be retried in that country – with the death penalty one potential outcome.

Defence lawyer Hal Mattson said he believed Xie’s sentence was severe enough that Chinese authorities wouldn’t put him back on trial.

“It’s very difficult to read their law and figure out exactly what he’s eligible for,” he told CTV News.

“My best information is that … they probably will not retry him. That’s what I’m hoping.”