A small explosion has rocked the Egyptian consulate in the Libyan city of Benghazi, blowing out its windows and those of adjacent buildings.

"Unknown assailants in a vehicle threw an explosive device at the Egyptian consulate in Benghazi without causing casualties," said security spokesman Abdallah al-Zayedi.

The attack came as dozens of people protested outside the consulate against a deadly police crackdown Wednesday on supporters of Egypt's ousted President Mohamed Morsi.

The blast caused part of the outer wall of the building to collapse.

Al Jazeera's Mahmoud Hussein, reporting from the scene, said many cars were also damaged in the blast.

Residents in the area spoke of a "state of terror" after the loud explosion, he said.

'Egyptian affair'

Police cordoned off the area and were collecting evidence.

"The security services have a description of the vehicle and are pursuing it," said Zayedi.

The Libyan government said on Saturday it has adopted a policy of neutrality regarding the situation in neighbouring Egypt.

"Libya believes that what is happening in Egypt... is strictly an internal Egyptian affair in which the Libyan government will not interfere," the government said.

The statement said Tripoli supported moves to ensure consensus building, safety and security in Egypt, while expressing "deep regret and pain for lost lives and bloodshed".

Morsi, Egypt's first democratically elected president, was ousted in a popularly-backed military coup in early July. 

Source: Al Jazeera and agencies