Libya's acting prime minister sought to reassert authority over his turbulent country by naming a new cabinet, but some lawmakers threatened to veto his choices and a rival assembly continued to hold sway in the capital.

Abdullah al-Thinni's administration has failed to control militia and Islamists who backed the rebellion to toppled long-time ruler Muammar Gaddafi in 2011, then kept their weapons and started to stake claims on territory, oil and other resources.

Politicians said he asked parliament to approve a new 16-strong cabinet, including human rights activist Farida Allaghi as foreign minister - his first new government since he was re-appointed as acting premier earlier this month.

Diplomats have gathered in the Spanish capital Madrid to try and find a solution to the crisis in Libya after clashes in Benghazi left at least nine people dead and 30 wounded.

Representatives from Libya's armed groups are not attending the conference, which opened on Wednesday and is being attended by representative from 16 nations, the UN and the Arab League.

Al Jazeera's Stefanie Dekker, reporting from Madrid, said the conference may not reconcile the warring sides.

Live Box 2014526124723906113

"It is very difficult to see how they can achieve something here that is going to have a real impact on the ground especially because the government in Tripoli, the opposition, is not here. They [Tripoli government] does hold sway and have strong militia," she said.

Libya has two competing governments which were both sworn in this month. The country's former government in the capital Tripoli is refusing to accept the new one in the remote eastern city of Tobruk.

Libya's government and elected House of Representatives last month relocated to Tobruk after an armed group from the western city of Misrata seized Tripoli and most government institutions.

The Madrid conference is taking place against this background of continued unrest across Libya.

On Tuesday, heavy clashes broke out  between a former Libyan general's forces and Islamist fighters in the eastern city of Benghazi, claiming several lives, medics said.

Nine soldiers were killed and 30 others were wounded when the Islamists made a new push to approach the airport, a hospital medic said.

"We are still controlling the airport," Saqer al-Jouroushi, Khalifa Haftar's air defence commander, told Reuters news agency, adding that his troops had managed to ready four Gaddafi-era helicopters and four MiG fighters.

Haftar, who served in Gaddafi's army and was accused by the post-revolution government of trying to stage a coup against it, has declared war on several Islamist factions and teamed up with government forces in Benghazi.

Source: Al Jazeera and agencies