A Conservative MP has said he had rocks and tomatoes hurled at him after he was ambushed by around 50 "violent thugs" before a talk on squatting.

Mike Weatherley, MP for Hove in East Sussex, had to seek refuge in a room on Wednesday as shouting protesters gathered outside at the University of Sussex near Brighton.

He had been invited to talk about his involvement in changing the law to criminalise squatting. Just before the debate was to start, a large mob of non-students surrounded him and threatened him, he said. Security officials barricaded him and his staff in a room until the police arrived and took him away in a van.

Weatherley said: "It's absolutely outrageous that a peaceful event such as this should be hijacked by a group of violent thugs. As soon as I walked into the lecture theatre someone attempted to punch me.

"The event was immediately abandoned, but as we tried to leave, rocks were hurled, and two female members of my staff were injured. My staff and I were barricaded into a room, until the police arrived."

Weatherley has been campaigning for squatting to be criminalised since his election to parliament in 2010.

Sussex police said: "Just before 1.50pm on Wednesday 14 November, police were called to the Silverstone Building in Arts Road on the University of Sussex campus at Falmer, after a report of a disturbance.

"A group of people were outside the building where Mike Weatherley MP was present. Officers took Mr Weatherley to safety in a police van. It is understood that there are no reports of injury at this time."

One member of Weatherley's staff had her arm crushed in a door while another had a rock thrown at her neck, it was claimed. Weatherley said they were "very fortunate" to have found a room to lock themselves in, away from the crowd.

He voiced his thanks to the security guards and the police whom he has made a statement to about the incident, which follows opposition from pro-squatting campaigners against the introduction of new laws.

Powers which came into effect on 1 September allow local authorities to call in the police to arrest squatters, rather than pursuing lengthy civil eviction proceedings through the courts.

Under the powers, contained in the Legal Aid, Sentencing and Punishment of Offenders Act 2012, councils can remove squatters by simply complaining to the police who, if satisfied that the claim is genuine, can arrest the illegal tenants.

Weatherley said: "The squatters have regularly attempted to stop free speech from taking place for the precise reason that they cannot justify their criminal behaviour.

"I have made a statement to Sussex police, and to Sussex University security, about the most violent members of the mob.

"Once the trouble started, both police and security did their jobs incredibly well. I am grateful to them."

The university said: "We are appalled to hear that Mike Weatherley was prevented from speaking on campus by a group of protesters. [They are] not our students."