Libya's foreign minister has named renegade General Khalifa Haftar, the controversial chief of the self-styled Libyan National Army (LNA), as the head of the country's army - provided that he recognises the UN-backed Government of National Accord (GNA) as the only authority.

Haftar, whose LNA forces control key oil ports, is a dominant figure for factions in eastern Libya that have rejected the GNA, contributing to its failure to expand its power in the capital, Tripoli, and beyond.

In a press conference in Algeria's capital, Algiers, on Monday, Mohammed Siyala, of the GNA, announced that Haftar was "the commander-in-chief of the Libyan army". He later added that Haftar first must recognise the Tripoli-based GNA as Libya's sole authority.

The Algiers conference was also attended by Abdelkader Messahel, Algeria's minister of Maghreb affairs, African Union and Arab League, and UN envoy to Libya Martin Kobler.

Siyala at the news conference in Algiers, Algeria [Ramzi Boudina/Reuters]

Siyala later told the AFP news agency that Haftar must "accept to work under a civilian authority" in order to play a role in the country's future.

The announcement came after Haftar met last week in Abu Dhabi, United Arab Emirates, with the head of the GNA, Fayez al-Sarraj, in an effort to end the country's ongoing crisis.

Al Jazeera's Mahmoud Abdelwahed, reporting from Tripoli, said the statement about Haftar's new role had been met a "wave of criticism".

"Many people are angry and are wondering how a general whose forces have committed atrocities in Benghazi, whose aircrafts have been raiding ports and airports all over Libya, can be called by the UN-backed GNA as the commander and chief of the Libyan army," he said.

"There is a contradiction here because Haftar himself does not recognise the UN-backed government."

Tanks and armoured vehicles deployed to protect the GNA's headquarters as tensions soared in the Libyan capital shortly after Siyala's comments, witnesses said.

On Tuesday, a powerful GNA-allied militia in Tripoli denounced the minister's remarks in a statement.

It said the idea of the parliament giving Haftar legitimacy "went against the Libya political agreement" inked in December 2015 that gave rise to the UN-backed government.

That UN-brokered deal gave no role to Haftar or his forces, but the general has since imposed himself as a key player, especially after seizing the country's key oil terminals in September.

Libya has been wracked by chaos since the 2011 revolt that toppled and killed longtime leader Muammar Gaddafi, with rival militias and authorities vying for control of the oil-rich country.

Haftar is a divisive figure among Libyans. While he has been criticised for his aggressive use of force, including air raids, he has also been praised by some for attempting to restore order to the war-torn country.

UAE meeting

International powers had for months been pushing Serraj and Haftar to discuss resetting a UN-mediated agreement that led to the creation of the GNA in late 2015.

In statements last week in Abu Dhabi, the two men called for a resolution to Libya's political and economic crises and for joint efforts to battle armed groups, but offered no shared way forward for a political deal to unify the country.

Sarraj said the two sides had agreed to put in place "a strategy ... to form a unified Libyan army" under civil control.

The statement issued by his office also said the meeting with Haftar had been held in order "to achieve a peaceful settlement for the Libyan crisis" and called for "an expanded dialogue to establish national consensus".

Haftar's statement said the two sides had agreed to allow "the military establishment ... to fully play its role in the fight against terrorism".

Both men said they had agreed to put an end to violence in southern Libya, where LNA and pro-GNA forces clashed in early April around an airbase on the edge of the southern city of Sebha.