Britain's ambassador to Libya was in a convoy of cars attacked in the eastern city of Benghazi, a British embassy spokeswoman has said.

"A convoy carrying the British ambassador to Libya was involved in a serious incident in Benghazi this afternoon," the spokeswoman said on Monday.

"Two close protection officers were injured in the attack but all other staff are safe and uninjured," she said, adding the injured officers were receiving medical treatment.

The diplomatic convoy was hit by a rocket-propelled grenade, local security officials ssaid earlier on Monday.

The spokeswoman earlier said that all staff were accounted for following the attack. "We are liaising closely with the Libyan authorities," she said.

Unis Sharif, Libya's deputy interior minister, said the vehicle was carrying security personnel in a convoy for the head of the British diplomatic mission in Benghazi.

The convoy was hit about 300m from the British consulate office in Benghazi's al-Rabha neighbourhood.

A Reuters reporter at the scene said police had cordoned off the area. A damaged but still intact car windscreen could be seen lying on the ground.

Security experts blamed an armed group for allegedly attacking the convoy with a rocket-propelled grenade.

According to the experts, the area around the city is home to a number of groups who oppose any Western presence in Muslim countries.

Five days ago, an explosive device was dropped from a passing car outside the offices of the US diplomatic mission in Benghazi. The blast that followed slightly damaged the gate in front of the building.

On May 22, a rocket-propelled grenade hit the offices of the International Committee of the Red Cross in the city, blasting a small hole in the building but causing no casualties.

Benghazi was the cradle of the uprising last year, which ended Muammar Gaddafi's 42-year rule. Since then, it has become a hot spot for violence. Arms remain readily available and state security forces are struggling to assert their authority.

The violence comes as the North African nation prepares to elect a general national congress, with the vote set for July 7.