We already know a tweet can land you in trouble with the law. But a group of student journalists at Montreal’s McGill and Concordia Universities have discovered it can just as easily get you out of trouble.

Journalists from the McGill Daily and Concordia’s The Link were detained Thursday night while covering a protest against tuition hikes declared illegal by authorities. According to a tweet from the Daily’s photo editor, Hera Chan, she and other student journalists were kept in custody longer than other journalists because, as students, they weren’t part of the “organized press.”

That’s when Chan, along with her McGill colleague Henry Gass and the Link’s Riley Sparks began tweeting at the Montreal police department Twitter handle, @SPVM (Service de la Police de la ville de Montreal).

Within an hour, the students were released.

The Canadian community news organization Open File has a Storify of how it all went down:

Photo by Hera Chan