People walk past police cars at the University of Waterloo.

Federal prosecutors at the sentencing hearing of a former student who went on a stabbing rampage at the University of Waterloo in southern Ontario last year told court on Tuesday that his actions were ideologically motivated.