ROME (Reuters) - Libya’s eastern-based military commander Khalifa Haftar was quoted on Friday as saying force must remain an option for imposing order in the country, though he added that a political solution would be preferable.

General Khalifa Haftar, commander in the Libyan National Army (LNA), attends a meeting with Russian Foreign Minister Sergei Lavrov in Moscow, Russia August 14, 2017. REUTERS/Sergei Karpukhin

Libya has been mired in turmoil since a 2011 NATO-backed uprising that ended Muammar Gaddafi’s 42-year rule, giving space to Islamist militants and smuggling networks that have sent hundreds of thousands of migrants to Europe via Italy.

Italy and other Western states have tried to work with the U.N.-backed Government of National Accord (GNA) in Tripoli, but factions aligned with Haftar control eastern Libya and back a rival government.

“It’s obvious that we prefer the political routes, but when these don’t work there must be other solutions,” Haftar told Italy’s Corriere della Sera newspaper in an interview.

“We are defeating terrorism in Libya not through diplomatic channels, but with weapons.”

Haftar’s comments came as United Nations envoy Ghassan Salame made a renewed push to get rival factions to sign up to a plan to stabilize Libya and take the country toward presidential and parliamentary elections.

Haftar spoke to the Corriere after his first official visit to Italy on Tuesday. After the meeting, Italian Defense Minister Roberta Pinotti expressed hope that all parties would support Salame’s “inclusive political strategy... excluding any military solution”.

Haftar also said Pinotti had agreed to train his soldiers and urged the revocation of a U.N. arms embargo “if European countries are interested in stopping migrants”.

He also criticized Italian efforts to convert armed groups on the Western coast into anti-smuggling police.

“It’s a big mistake. The Italian government should not be led astray by the militias... Tomorrow they will fight among themselves for a share of the spoils; it will be a never-ending blackmail,” Haftar said.

Some international media have reported that the leader of one such group, the Anas al-Dabbashi brigade, had received five million euros directly from Italy’s secret services to stop the migrant boats.

Italy has denied making any direct payments to armed groups.

There has been a sharp reduction in migrant departures since the brigade, known previously as one of the country’s biggest people smuggling gangs, clamped down on trafficking in July in exchange for promises of legitimacy and state security jobs from the GNA.

Almost two weeks ago, fighting broke out in Sabratha between the Dabbashi brigade and its allies and rival cross-town factions.