Fighters from the self-proclaimed Libyan National Army loyal to Khalifa Hifter attend their graduation ceremony in Benghazi on April 18, 2019. (Abdullah Doma/AFP/Getty Images)

The White House said Friday that President Trump, in a phone call with renegade Libyan general Khalifa Hifter, praised Hifter for fighting terrorism and protecting Libya’s oil, comments that were far afield from the administration’s stated policy on Libya.

Hifter, whose militia forces have long controlled eastern Libya, launched an offensive early this month to seize Tripoli, the capital, and oust the U.N.-backed government.

Amid heavy fighting that threatens all-out urban warfare, the United Nations and many countries — including the United States — have called for an immediate cease-fire.

The State Department and the Defense Department have publicly urged Hifter to stand down and join U.N.-led negotiations with the National Accord government headed by Prime Minister Fayez Serraj. In a sharply worded statement last week, Secretary of State Mike Pompeo said that the United States was “deeply concerned” and that “we have made clear that we oppose the military offensive” by Hifter’s forces.

The White House statement, released four days after Trump’s previously unreported call on Monday, made no mention of Hifter’s offensive, a cease-fire or the U.N. effort. Referring to Hifter as “Field Marshal,” it said he and Trump discussed “a shared vision for Libya’s transition to a stable, democratic political system.”

The White House declined to respond to questions about the call or how it came about. Calls with the president are normally reserved for fellow heads of government.

A State Department official said Friday that “we have voiced our deep concern at the highest levels about instability in Tripoli” and said that “all involved parties should return to the political process.”

At the same time, “we continue to believe that General Hifter can be an important part of a political solution,” said the official, who spoke on the condition of anonymity under rules imposed by the State Department.

Acting defense secretary Patrick Shanahan said Friday that the Pentagon “and the executive branch are well aligned on Libya.” Asked if the United States supports Hifter’s offensive, he said that “the military solution is not what Libya needs.”

In a Twitter message, the National Accord government said an arrest warrant had been issued for Hifter and other military officials.

Several Libya experts compared the call, and the White House statement, to previous times when Trump appeared to contradict stated foreign policy. In December, during a call with Turkish President Recep Tayyip Erdogan, Trump said he would immediately withdraw all U.S. troops from Syria. State Department officials and the president’s own national security adviser, John Bolton, had recently announced the outlines of a new strategy to keep U.S. forces there indefinitely.

In mid-2017, after a visit to Riyadh, Saudi Arabia, Trump tweeted his agreement with allegations by Saudi Arabia and the United Arab Emirates that Qatar was supporting terrorism, even as his secretary of state and defense secretary were calling for the Persian Gulf countries to settle their differences.

Hifter’s primary backers are the governments of Egypt, the United Arab Emirates and Saudi Arabia, whose leaders are in close and regular contact with Trump. Egyptian President Abdel Fatah al-Sissi visited Washington last week. On Thursday, Trump spoke by phone with Abu Dhabi Crown Prince Mohammed bin Zayed, the country’s de facto ruler.

All three of those governments, and Hifter, have charged that Libya is a hotbed of political Islam and the Muslim Brotherhood, which the Trump administration has considered designating a terrorist organization.

Russia has also provided Hifter’s Libyan National Army forces “with all kinds of equipment, people, training and the like,” Marine Gen. Thomas Waldhauser, head of the U.S. Africa Command, told lawmakers last month, shortly before ordering the evacuation of the small contingent of U.S. military forces in Tripoli. U.S. diplomats assigned to Libya are based in neighboring Tunisia.

Hifter has also received backing from France and, in the past, from the United States, at least until the 2014 conflict that broke out following the overthrow and death of Libyan dictator Moammar Gaddafi. Since then, the country has been divided between the U.N.-backed government in Tripoli in the west and a Hifter-supported administration in the east.

Libyan politicians have often been powerless to control militias of all stripes — including those backed by the Islamic State and al-Qaeda — which have warred over power, territory and Libya’s oil resources.

Both the United States and Europe have expressed concern about terrorist expansion in North Africa and the extent to which Libyan lawlessness has contributed to the flow of migrants from Africa. Trump has voiced particular interest in international oil production and ensuring that gas prices in the United States are not affected by U.S. sanctions against Iranian oil exports.

But Western allies have also agreed that Hifter’s attempt to take control of the country through military force is likely to increase turmoil in Libya, perhaps opening the door to even more terrorist activity, and have supported a negotiated solution.

Trump’s call with Hifter “pretty much undermines seven or eight years of U.S. policy,” including during Trump’s first two years, said Ben Fishman, who served as director for Libya at the National Security Council during the Obama administration. “Our policy was to support a U.N.-backed peace process.” By describing Hifter as a counterterrorism partner and “someone who would protect the oil fields,” Fishman said, “it sure sounds to me that [Trump] is playing favorites.”

Frederic Wehrey, author of “The Burning Shores: Inside the Battle for a New Libya,” described the call, and the White House description of it, as “another flip-flopping reversal, and a case of mixed signals, by Trump’s highly personalized, capricious interventions.”

“I think this is a huge symbolic boost to Hifter, being felt on the battlefield. It emboldens him to ignore even the humanitarian cease-fire” that the United Nations is trying to broker, said Wehrey, a senior fellow at the Carnegie Endowment for International Peace.

Maj. Gen. Ahmed al-Mismari, spokesman for Hifter’s Libyan National Army, said American leaders “know well what is going on in Libya. . . . They know the armed forces [under Hifter] are fighting for global stability and international peace.”

He said Trump and Hifter did not discuss potential cease-fires, or ending the current offensive, which he described as the latest phase of a military campaign launched by Hifter five years ago in eastern Libya.

Mismari said the lack of any reference in the White House statement to the U.N.-backed government or a negotiated political agreement was “proof” that the U.S. position was “totally changing in a different direction.”

Deborah Jones, who served as U.S. ambassador to Libya from 2013 to 2015, said she thought that “the president has been influenced by an overly optimistic assessment of Hifter’s ability to take Tripoli,” and that Hifter’s supporters “are gambling that this alleged USA endorsement will turn the tide.”

In a briefing for reporters Thursday, Stéphane Dujarric, spokesman for U.N. Secretary General António Guterres, said that “the number of civilian casualties and attacks on civilian property and infrastructure are on the rise” in and around Tripoli. U.N. negotiator Ghassan Salame has made “impassioned calls . . . for at least a humanitarian pause” in the fighting, Dujarric said.