Students occupying four houses owned by the University of Melbourne have been told they must leave the properties.

The Student Housing Action Collectives (SAHC) have occupied the houses in Carlton since August.

They are trying to pressure the University to provide more affordable student housing.

The Supreme Court today ruled the university has the right to recover the properties.

However, a spokesman for SHAC, Teishan Ahearne says the students will not leave.

"This is our home. People living at SHAC don't have anywhere else to go," he said.

"So we've been providing housing for people who are otherwise homeless for four months now and we see absolutely no reason to leave."

In a statement, the university's acting Vice-chancellor, Peter McPhee, says the university continue to seek the cooperation of the squatters and hopes they will leave the properties voluntarily.