Dozens of self-styled anarchists clashed with police early Wednesday and trapped more than 20 people attending a book-launching ceremony inside Athens' Polytechnic University (search) for more than six hours before they peacefully dispersed.

Two deputies with the main opposition Socialist party (search) were among the two dozen or so people trapped inside the university campus in downtown Athens (search) after the anarchists late Tuesday attacked two cars belonging to the politicians, police said.

In the clashes with riot police that followed, an anarchist was apparently injured by a gunshot. A police officer was also hospitalized after being hit by a rock.

"We had a political discussion with a group of people," former Culture Minister Evangelos Venizelos said as he left the university campus with the other 20 or so people that were inside with the anarchists. "They are people with anger that they need to vent."

The socialists lost to the conservatives in elections held 14 months ago.

Riot squads were rushed to the scene after the violence broke out. Officers used tear gas to disperse a number of anarchists who went on a rampage, damaging nearby shops. The anarchists then fled into the campus for safety, also trapping the people attending the book fair inside the university.

Under Greek law, police are barred from entering university campuses without permission from the schools, and such permission is rarely given.

The standoff between riot squads and anarchists ended when police agreed to let the anarchists peacefully leave the campus. There were no arrests.

Anarchists often clash with police in downtown Athens and often seek sanctuary inside the Polytechnic campus. Arson gangs associated with anarchist groups frequently target cars and property at random, as well as property belonging to government agencies, large companies and diplomatic missions.