BENGHAZI, Libya — Pulverized buildings daubed with the names of fallen fighters line the ghostly seafront in Benghazi, Libya’s second largest city. Land mines and booby-trapped bodies are scattered across the rubble. At night, men huddle over bonfires piled with broken furniture.

This picture of devastation is what victory looks like for Gen. Khalifa Hifter, the military strongman whose forces routed the last Islamist militias from Benghazi in December. After three years of grinding combat, and with the help of foreign allies, General Hifter now controls most of eastern Libya and has become the most powerful if polarizing figure in a fractured landscape.

Now, as he aims to consolidate and expand his power, he is looking to woo the Trump administration. In December, he hired a firm of Washington lobbyists to burnish his image as a potential future leader of his country, and to counter critics who denounce him as a crude warlord.

He has already allowed the C.I.A. to establish a base in Benghazi — a low-key American return to the city after Ambassador J. Christopher Stevens was killed there in 2012 — and a handful of American Special Forces operators are present at an air base near the city, American officials said.