Turkey has begun to deploy troops and specialised equipment to Libya in an effort to thwart the ambitions of a renegade general to take control of the entire country, including the capital.

Turkish president Recep Tayyip Erdogan disclosed late on Sunday that the first contingent of armed forces had already arrived in Libya to help the United Nations brokered-government in the country thwart a nine-month offensive on Tripoli by Khalifa Haftar.

The army officer, backed by the United Arab Emirates, Egypt, Saudi Arabia and Russia, controls much of eastern and southern Libya but has been unable to take the capital and much of western Libya.

Sources with knowledge of the plans told The Independent that Turks have so far deployed no more than 50 members of the armed forces consisting mostly of special operations personnel.

The troops will help train and rally western Libyan armed forces and technicians to operate KORAL, a Turkish electronic warfare system meant to render useless the unmanned drones and precision weapons used by Mr Haftar and his backers to wreak havoc from the air.

The UN-backed authority in Tripoli accuses Mr Haftar’s forces of killing at least 30 cadets and injuring at least another 30 in an airstrike on Saturday on a military academy in the capital.

“The government in Tripoli is suffering a lot from airstrikes that could be prevented with strong electronic warfare,” said Tarek Cherkaoui, a north Africa specialist at TRT World Research Centre, a think tank affiliated with Turkey’s state broadcaster. “From the beginning, because [the Libyan government] relies on small units not working in a coordinated manner, they have needed a strong command and control structure that Turkey is going to help them build.”

Protests against Turkey sending forces to Libya Show all 12 1 /12 Protests against Turkey sending forces to Libya Protests against Turkey sending forces to Libya A woman brandishing a rifle takes part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters gather during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Libyans and Syrians take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya Libyans wave a Turkish and a national flag during a rally in support of the UN-recognised Tripoli-based government (GNA), in the capital Tripoli on January 3, 2020. (Photo by - / AFP) (Photo by -/AFP via Getty Images) - AFP via Getty Protests against Turkey sending forces to Libya Turkish members of parliament vote to send Turkish troops to Libya. They passed a bill approving a military deployment to Libya aimed at shoring up the UN-backed government in Tripoli, at a time of intensifying international tensions over the conflict. The beleaguered Tripoli government has been under sustained attack since April by military strongman General Khalifa Haftar, who is backed by Turkey's regional rivals - Saudi Arabia, Egypt and the United Arab Emirates AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters shout slogans during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Libyan protesters shout slogans during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Women carry pictures of killed soldiers as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya People raise a picture of Syrian President Basha al-Assad as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya People raise Syrian national flags as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya Libyans burn a picture of strongman Khalifa Haftar during a rally in support of the UN-recognised Tripoli-based government (GNA), in the capital Tripoli on January 3, 2020. (Photo by - / AFP) (Photo by -/AFP via Getty Images) - AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters gather during a demonstration against the Turkish parliament's decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori NO RESALES. NO ARCHIVES. TPX IMAGES OF THE DAY ESAM OMRAN AL-FETORI Reuters

At stake is the future of the large oil-rich north African country, which has been embroiled in civil strife since a Nato-backed armed uprising toppled its longtime dictator nearly nine years ago. The country is now split into two rival authorities, each propped up by a collection of armed forces and foreign countries.

The messy, ongoing war, centred on the country’s most densely populated quarter, has had a devastating impact on civilians. Some 880,000 people are in need of humanitarian assistance in Libya, according to a report to be issued tomorrow by the International Rescue Committee. The United Nations Security Council is set to meet today to discuss Libya.

Turkey’s foreign minister Mehmet Cavusoglu was scheduled to meet on Monday with counterparts in Libya’s giant neighbour Algeria in an attempt to shore up support for the intervention and assure nervous generals in Algiers that Ankara had no intention of setting up a permanent north African beachhead.

Turkey’s historic ties to north Africa stretch back to the 16th century, and mediaeval fortresses built by the Ottoman Empire continue to stand in Libya as far south as the Chadian border.

Turkey has already organised and dispatched about 1,000 Syrian former rebel fighters to Libya, and has recruited additional 1,700, according to the Syrian Observatory for Human Rights, a monitoring group.

Ankara last week authorised the deployment of troops to Libya and finalised a maritime security deal with the government in Tripoli that would project Turkish power deep into the Mediterranean. The deal angered Egypt, Greece, and Cyprus.

The rival government in eastern Libya backing Mr Haftar has disavowed the deal, and Mr Haftar in a televised appearance on Friday angrily called for “jihad” against Turkey.

Mr Erdogan, in an interview with a Turkish broadcaster late on Sunday, confirmed that there would be a “gradual” deployment of Turkish troops to Libya.

“There will be an operations centre, there will be a Turkish lieutenant general leading and they will be managing the situation over there,” he told CNN Turk. “Our soldiers’ duty there is coordination. They will develop the operation centre there. Our soldiers are gradually going right now.”

Mr Cherkaoui and other Turkish military specialists have said Turkey will deploy more than 2,000 troops to Libya.

KORAL, a land-based mobile electronic warfare system designed by Turkey’s Aselsan defence contractor, is designed to jam and deceive radar systems. According to one insider, it can mimic the signals guiding precision missiles to direct them away from their targets.

Mr Haftar’s backers in Cairo, Abu Dhabi and Moscow have been covertly sending aid in violation of a UN embargo for years. But Mr Cherkaoui said Turkey’s armed forces don’t have the same covert capabilities, and lack a grey zone mercenary outfit like Russia’s Wagner Group.