The landlord of a building in Sydney's inner west could be fined up to $22,000 if a tribunal finds the eviction of squatters on the property was unlawful.

Dozens of riot police entered the squat, well known as the Hat Factory, on Wilson Street in Newtown yesterday afternoon.

They used a large, circular saw to gain entry, but no-one was inside at the time.

The squatters will face the Civil and Administrative Tribunal on August 8 to determine whether they were legal tenants of the residence.

Legally, a residential tenancy agreement can be determined orally or in writing between the owner and the residents and does not always involve paying rent.

Ben Hall lived in the squat for three years, and said this agreement had been made a number of times since 2001.

"Under Tenancy Law there have been agreements which would constitute a tenancy agreement, both written and verbal," he said.

If the tribunal finds they were tenants, yesterday's eviction could be deemed unlawful.

Chris Martin from the Tenants' Union of NSW said it was advisable to get a decision from the tribunal before making an eviction.

"The prudent course is to let the tribunal answer the question," he said.

"There are heavy penalties for unlawfully evicting a tenant."

Landlords can be fined up to $22,000 if they are found to have unlawfully evicted a tenant.

The squatters said in a statement that the "space has existed over the past decade serving as a living space and community centre".

They said they hosted a free library, bicycle workshop and an open kitchen for community meals.

The City of Sydney's policy in regards to squatters was to evict them if a place was deemed unsafe.

In a statement, the council said two of its officers attended the Wilson Street property twice this week to inspect its public health and safety.

"The officers were prevented from entering by squatters at that time," the statement said.

"City officers will attempt to reinspect the property in coming days.

"Separately, NSW Police were involved in the removal of the squatters on Thursday. The operation was instigated by the owner of the property."

New South Wales Police said the owners would secure the residence in the coming days.