(CNN) President Donald Trump spoke with Libyan general Khalifa Haftar Monday, praising his role in fighting terrorism and securing Libya's vast oil resources even as Haftar's troops continue their offensive against the UN and US-backed government in the Libyan capital of Tripoli.

Trump "recognized Field Marshal Haftar's significant role in fighting terrorism and securing Libya's oil resources, and the two discussed a shared vision for Libya's transition to a stable, democratic political system," the White House said Friday in its official readout of the call.

The statement made no mention of Haftar's offensive on Tripoli, and Trump's praise for the rogue Libyan general signals a departure from previous administration statements condemning Haftar's march on the capital.

"We have made clear that we oppose the military offensive by Khalifa Haftar's forces and urge the immediate halt to these military operations against the Libyan capital," Secretary of State Mike Pompeo said in a statement issued earlier this month.

"This unilateral military campaign against Tripoli is endangering civilians and undermining prospects for a better future for all Libyans," he added.

At least 213 people have been killed and 1,009 have been injured in clashes around the Libyan capital this month, according to the World Health Organization.

Asked about the Trump-Haftar call, acting Secretary of Defense Pat Shanahan said Friday that the Pentagon "and the executive branch are well aligned on Libya," while emphasizing that "a military solution is not what Libya needs" when asked if the US backed Haftar's assault on Tripoli.

"A military solution is not what Libya needs, so what we've said before and what I do support is Field Marshal Haftar's support in terms of his role in counterterrorism but where we need Field Marshal Haftar's support is in building democratic stability there in the region," Shanahan said.

While the US has primarily backed the UN recognized Government of National Accord which is based in Tripoli and led by Prime Minister Fayez al-Sarraj, American diplomats and military officers have maintained contacts with Haftar whose Libyan National Army controls much of eastern and southern Libya.

As a result of Haftar's offensive, in April the US military withdrew a small number of troops from Libya that had been performing diplomatic and counter-terrorism missions against ISIS, citing "increased unrest in Libya."

A one-time officer in former Libyan leader Moammar Gadhafi's army who spent years living in exile in Virginia and later fought against Gadhafi's regime, Haftar, who is aligned with a parliament based in the country's east, has also reportedly received some support in the past from France, Russia, the UAE and Egypt.

The head of US Africa Command, Gen. Thomas Waldhauser, told Congress last month that the Russians were backing Haftar in part to secure influence in a strategic area on NATO's southern flank.

"Behind the scenes there's no doubt about the fact they've supported the (Libyan National Army) with all kinds of equipment, people, training and the like and they've supported Haftar, who has moved now from the east to the west and essentially has taking a lot of real estate to get into a good position for leverage for diplomatic talks," Waldhauser told the House Armed Services Committee.

Asked why Moscow was backing Haftar, Waldhauser answered: "It gives them influence and it gives him influence in a key location in the southern (Mediterranean) on the southern part of the NATO, if you will, and it allows them then to reinvigorate some old Gaddafi-era contracts in the oilfield weapon sales and the like. So there's a strategic interest for them to be behind both sides, but primarily really Haftar."