Donald Trump warned his Turkish counterpart that “foreign interference is complicating the situation in Libya”, after Ankara voted to send troops to the oil-rich North African state. Mr Trump spoke to Recep Tayyip Erdogan, the Turkish president, on Thursday after Turkey’s parliament approved a year-long mandate to dispatch armed forces to prop up the ailing government of Libyan prime minister Fayez al­ Sarraj.

While Mr Sarraj’s government of national accord is recognised by the  UN as the legitimate authority in Libya, it has been struggling to fend off an offensive on Tripoli, the Libyan capital, by forces loyal to military strongman Khalifa Haftar. Tripoli made the request for military support from Turkey to help it counter Gen Haftar’s assault last week, making formal for the first time one part of a tangled web of foreign interests. Gen Haftar controls most of Libya and is backed by Turkey’s regional rivals Egypt, Saudi Arabia and the  United Arab Emirates, as well as Russia.

“President Trump pointed out that foreign interference is complicating the situation in Libya,” the White House said in a statement following the telephone call on Thursday. Although the US officially supports the UN peace process that underpins Mr Sarraj’s government, which Turkish troops are intended to buttress, Mr Trump has previously praised Gen Haftar’s efforts to counter terrorism and secure oil resources. The comments have been seen by some as coming close to endorsing Gen Haftar, counter to official US policy.

“The United States supports the ongoing efforts of UN special representative Ghassan Salame and the UN Support Mission in Libya to chart a path that provides security and prosperity for all Libyans,” a US state department official said on Thursday, adding that external actors “must stop fuelling the conflict”. “All countries must refrain from exacerbating the civil conflict and support a return to the UN-facilitated political process,” the  official said. Mr Erdogan has previously said that Turkey would do what it could to help the “legitimate government of Libya”, which he said was under attack from  a

“warlord”.