The UN will host talks between Libya's rival factions from Wednesday in Geneva, Switzerland. amid warnings that they could be the last chance for peace in the battle-scarred nation.

The talks will be overseen by UN envoy to Libya and the UN chief's special representative Bernardino Leon.

"This is an opportunity the Libyans cannot afford to miss," Federica Mogherini,  EU's foreign policy chief, said in Geneva on Tuesday.

She called on Libyans to "take this opportunity because we are not sure there are going to be other opportunities in the future".

Libya has descended into chaos since the fall of Muammar Gaddafi in October 2011 after a NATO-backed revolt, with rival governments and fighters battling for territory.

The North African country's internationally recognised government, which has lost control of much of the country, has pleaded for international help in combating the fighters.

Earlier on Tuesday, three Libyan soldiers were killed and four others wounded in a suicide car bombing on a road checkpoint west of Benghazi, according to a military official.

The attack happened when an assailant drove an explosives-laden car into the checkpoint, located about 100km west of Benghazi on the road to Ajdabiya, the official, who declined to be named, told the AFP news agency.

There was no immediate claim of responsibility for the attack but government forces have been battling Islamist fighters for control of Benghazi for months.

The same checkpoint was targeted by a similar attack in October but the attacker's car exploded before reaching the checkpoint and there were no other casualties.

Source: Agencies