Prime Minister Abdullah al-Thinni
Prime Minister Abdullah al-Thinni has survived an assassination attempt on his life Reuters

The motorcade of Libya's prime minister was attacked by gunmen en route to the airport in Tobruk.

Al-Thinni's car was sprayed with bullets and one of his guards was wounded according to an AP report.

"We were surprised by a lot of bullets... Thank God, we managed to escape," al-Thinni told TV news channel al-Arabiya after bullets hit his car as it left a parliament session.

Arish Said, head of the government's media department said that before the attack, armed men were protesting outside a session of the Tobruk government's House of Representatives.

They tried to storm the building and fired shots in the air, demainding al-Thinni stand down as prime minister. Due to the disruption, the session was postponed to resume next week.

Lawmakers in Tobruk told Reuters that crowds had gathered outside the parliament building on Tuesday (26 May) in protests against Mr al-Thinni's rule.

Demonstrators were said to have set fire to a car outside the building and al-Thinni was reportedly told by parliamentary speaker Aqila Saleh to leave for his own safety.

The prime minister has struggled to stamp his authority in Libya since coming to power in March 2014.

Thinni was criticised for running an ineffective rump state since losing the capital Tripoli in the west to a rival faction that now controls ministries and key state bodies based there.

His government had planned to set up parliament in the eastern city of Benghazi but was forced to relocate to Tobruk after heavy fighting between government forces and Islamist militias.

The government is being challenged by a Tripoli-based assembly known as General National Congress set up after a rival faction seized the capital in August.

Some militants have pledged allegiance to the Islamic State militant group who are establishing a base in Libya.

In January, Isis launched one of its biggest attacks in the Libyan capital of Tripoli, bombing an upmarket hotel.