Students at UQAM occupied one of the university's buildings Wednesday evening and barricaded the doors, while Montreal police surrounded the block.

The mood was tense and protesters were upset after police arrested 21 students earlier in the day during a demonstration.

They were also angry over statements made by UQAM Rector Robert Proulx.

"The position of the university is that we are legally obliged to give our courses​ to students who have the right to go to class and who paid their tuition," he said.

Proulx also added that that the university will not change its calendar, and will investigate the students who were arrested.

By 9 p.m. hundreds of students had blocked the doors to one of the university's buildings.

Students have barricaded the doors at J.-A.-DeSève pavilion. <a href="https://twitter.com/hashtag/UQAM?src=hash">#UQAM</a> <a href="https://twitter.com/hashtag/manifencours?src=hash">#manifencours</a> <a href="https://twitter.com/hashtag/cbcmtl?src=hash">#cbcmtl</a> <a href="http://t.co/rcpTEEuqZv">pic.twitter.com/rcpTEEuqZv</a> —@tanyabirkbeck

UQAM journalism professor Jean-Hugues Roy tweeted a photo of students barricading themselves inside.

Étudiants commencent à se barricader au DS <a href="https://twitter.com/hashtag/UQAM?src=hash">#UQAM</a> <a href="https://twitter.com/hashtag/manifencours?src=hash">#manifencours</a> <a href="http://t.co/2kg9fWkXJw">pic.twitter.com/2kg9fWkXJw</a> —@jeanhuguesroy

Police called in during afternoon

The occupation of the building came hours after a protest took place earlier in the day. The university's administration called in police at around 2:45 p.m. to keep the situation under control.

After 3 p.m., things got tense with standoffs, 21 arrests, and chanting from students.

"Hundreds of students were chanting. They used recycling bins to act as a barrier...Police had their hands on tear gas canisters. At one point, it looked like things were about to get out of hand," said CBC Montreal reporter Sarah Leavitt.

Montreal police were called to UQAM on Wednesday afternoon. (Béatrice Flynn) Professors at the university negotiated with police while students continued to taunt officers.

Michèle Nevert﻿, the head of the professors' union, told students police would leave if the students remained calm.

Police left the campus just after 4 p.m.

Students said they would continue to occupy the area until they knew what happened to the those who had been arrested. They moved from the basement to the main floor and held a sit-in, which continued into the night.

The 21 demonstrators who were arrested were released by police late Wednesday evening with the promise to appear in court to face charges that include unlawful assembly, mischief and wearing masks at an illegal gathering.

Multiple disturbances

At least six classes were cancelled yesterday at UQAM as student protesters continue fighting against the provincial government's cost-cutting measures.

The university called the police on Wednesday morning as after rowdy protesters caused multiple disturbances.

Students have been interrupting classes for at least the past two days.

This morning, students swarmed the hallways of the university in an attempt to interrupt classes. Some spray-painted over security cameras.

That's in spite of an injunction granted in court last week which forbade protesters from stopping students trying to attend classes.