Updated

Libyan lawmakers, gathered far from the country's chaos and warring militias, have elected a judge as the new parliament speaker.

Ageila Saleh Eissa narrowly defeated his rival for the post, Abu-Bakr Baeira, in a 77-74 vote late Monday night from among 158 lawmakers who convened the parliament session in the city of Tobruk.

Weeks of fighting in the capital, Tripoli, and the second-largest city, Benghazi, have killed more than 230 people and forced most foreigners and diplomats to leave Libya.

Eissa is the country's third parliament speaker since the downfall and killing of longtime dictator Moammar Gadhafi in the 2011 uprising and civil war.

He held several judicial posts in the east under Gadhafi but his political affiliation is unknown. Opponents, however, accuse him of being a Gadhafi loyalist.