The head of Libya's internationally recognised government has met the Algerian president during an official visit to discuss the heightened tensions in his country.

Libya was plunged into chaos after the toppling and killing of former leader Muammar Gaddafi in a 2011 NATO-backed uprising. Since 2014, it has been split into rival eastern and western administrations.

More:

Tensions escalated in April last year when renegade military commander Khalifa Haftar, who backs the eastern government, launched an offensive to capture the capital, Tripoli, the seat of the Government of National Accord (GNA).

During Monday's meeting with GNA head Fayez al-Sarraj, Algerian President Abdelmadjid Tebboune called Tripoli "a red line no one should cross".

He also urged the international community, particularly the United Nations Security Council, to fulfil their responsibilities for achieving peace and stability in Libya, according to Algeria's APS news agency.

Tebboune said since the beginning of the Libyan crisis, Algeria has adopted the principle of "finding a political solution to protect the unity of the Libyan people and the territorial integrity of the country without foreign intervention".

The meeting came before a separate visit to Algeria by Turkish Foreign Minister Mevlut Cavusoglu whose country has sent military units to Libya to back al-Sarraj's government.

The GNA recently sought help from Turkey, whose parliament passed a bill allowing the government to send troops to Libya to shore up the Tripoli government in line with an agreement between the two sides.

On Saturday, Libya's eastern-based parliament voted unanimously against the deals the Tripoli-based government signed with Ankara in late November.

Erdogan: Turkish forces in Libya

A day later, Turkey's President Recep Tayyip Erdogan announced that its soldiers had begun deploying in the North African country.

Erdogan said Turkey's objective was "not to fight", but "to support the legitimate government and avoid a humanitarian tragedy".

200106062845414

Last week, Haftar, who is backed by Egypt and the United Arab Emirates, had called on Libyans to take up arms in response to Turkey's expected military move.

"We accept the challenge and declare jihad and a call to arms," he said in a televised address on Friday.

The UN special envoy to Libya on Monday said he was "angry" at foreign interference in the war-torn country.

"I am really angry to see that everybody wants to talk about Libya and very few people want to talk about the Libyans, what happens to the Libyans," Ghassan Salame said after a two-hour meeting with the UNSC.

The European Union expressed concern about an "imminent" escalation of violence around Tripoli.

"The European Union calls on all sides to engage in a political process under the leadership of the United Nations," Josep Borrell, the EU high representative for foreign affairs, said on Monday.