Thousands of protesters took to the streets in Libya's capital, Tripoli, on Friday after US President Donald Trump praised Libya's Khalifa Haftar amid a military assault by the renegade general to seize the capital.

A White House statement said Trump and Haftar spoke by phone on Monday "to discuss ongoing counterterrorism efforts to achieve peace and stability in Libya".

On April 4, Haftar and his forces launched an offensive against the country's internationally recognised government, which is based in Tripoli.

In their phone call, Trump "recognised 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."