At least 13 people have been injured after two blasts rocked the eastern Libyan city of Benghazi in what appeared to be an attack on judicial institutions there, officials say.

A security source said the was an explosion in the vicinity of an office of the justice ministry and another near a court in the south of the city.

Video posted by residents online showed several vehicles destroyed by the explosion at the courthouse in northern Benghazi, which was the site of the first protests against dictator Muammar Gaddafi in early 2011 that led to his ouster.

Another courthouse in the eastern part of the city was also targeted, AP news agency reported.

Thirteen people were slightly wounded in one of the blasts which targeted a court in the north of the city, said Interior Ministry spokesman Rami Kaal.

Mohammed al-Hijazy, a spokesman for Benghazi security operations, added: "Assailants threw an explosive device under a car as it was parking in front of the court."

Hijazy said another explosion occurred in front of an office belonging to the justice ministry, but it was not immediately clear what had happened in that incident.

Both blasts happened around the time families were breaking their Ramadan fast.

Residents living near the court said the building, and others nearby, had sustained significant damage. Windows were blasted out and rubble was scattered on the ground.

"It was very loud and I saw the smoke. Some balconies of nearby buildings are damaged," Hassan Bakoush, a resident, told the Reuters news agency.

Hundreds of demonstrators gathered in Benghazi's streets denouncing the latest violence, according to residents.

Suleiman El Dressi, a Libyan journalist, told Al Jazeera that authorities had begun their investigation at the scene.

"The attorney general has ordered prosecutors and [the] security apparatus to move to the scene and start investigations. Security sources say a security meeting is taking place in a military base at Benghazi," he said.

It was unclear who was responsible for the attacks.

It comes after 1,117 prisoners escaped from Kuafiya prison on Saturday following a riot and an external attack on the prison.

On Sunday, authorities said that more than 100 of those who had escaped had been recaptured.