The image of the Russian aircraft carrier Admiral Kuznetsov steaming across the Mediterranean on its way to the Syrian shore became one of the symbols of Moscow’s military support for Syrian President Bashar al-Assad. When the aircraft carrier completed its mission in Syria in January this year and made a surprise port call in eastern Libya, analysts immediately suggested that Libya may become another country where Moscow will project its military power. However, while Russia sees an opportunity to become a powerbroker in the country, it is hesitant to commit to the resolution of the conflict militarily.

Admiral Kuznetsov’s voyage across the Mediterranean underpins Russia’s growing ambitions in the Middle East and North Africa. This strategy is largely based on engaging former Soviet allies in the region that, since the collapse of the U.S.S.R., have retained connections with Russia. Libya is one of those cases where a regime propped up by Moscow during the Cold War produced the strong ties between the two militaries that is helping Russia make inroads into Libya today. However, it is not purely geopolitical ambitions that motivate the Kremlin to get involved in the settlement of the crisis, but also pragmatic financial calculations.

Moscow lost billions of U.S. dollars in failed oil and arms transfer deals following the fall of the Qaddafi regime. Libya used to be one of the few countries on the Russian portfolio of arms importers that were able to pay hard cash. In 2008, Russia cancelled $4.5 billion of Libyan debt to the Soviet Union in exchange for signing a number of arms deals that by 2011 were estimated between $5 billion and $10 billion. These deals were suspended under the U.N. arms embargo after Muammar Qaddafi’s overthrow, and Moscow has yet to see the country deliver on these contracts. By playing the role of referee in Libya, Russia hopes for political and financial gains in the long run in the form of lucrative contracts and loyalty of any new Libyan government.

The player who Russia believes could expedite this outcome is General Khalifa Hifter, an embattled commander of the Libyan National Army that is headquartered in Tobruk. Hifter’s military background raises his profile among Russian policymakers, most of whom similarly received military training during the Cold War. The Kremlin sees this Qaddafi-era general as central to its policy in Libya. Not only is he seen as essential to a political solution, but also because he is powerful enough to coerce other parties into such a solution.

Russia and Hifter enjoy a marriage of convenience that is mutually beneficial. The wannabe Qaddafi benefits immensely from the international diplomatic cover that Moscow can provide, which has helped him position himself as a powerful alternative to the Tripoli government in the eyes of European powers. And by partnering with Hifter, Russia accomplishes a number of its goals, from expanding its influence in the Mediterranean and engaging Egypt more intensively, to acquiring another bargaining chip in its relations with Western counterparts.

The signing of the Libyan Political Agreement signed in December 2015 that brought the U.N.-backed government to power in Tripoli is seen by Moscow as the main obstacle to national reconciliation because it marginalizes Hifter, the man who controls the most potent force in Libya. Russia sees national reconciliation happening by merging the internationally-supported government and the army, but in a way that sees Hifter take a lead role in the future government.

But such an outcome requires Russia to play the role of powerbroker, and bring the various Libyan stakeholders, including Hifter, to the table. As far as Moscow is concerned, the Libyan Political Agreement’s failure to bring about a national accord has opened a diplomatic vacuum for it to exploit, with the agreement due to expire by the end of 2017.

To that end, the Russian government has also intensified efforts to build ties with the Tripoli government and other stakeholders, such as the Misrata Brigades. In 2016, Moscow established an inter-ministerial “Contact Group for Libya Reconciliation,” comprising Russian diplomats formerly posted in Tripoli as well as Russian MPs, who have been tasked with restoring old ties and developing a network of new contacts in Libya. This has resulted in a flurry of meetings between Russian officials and the Serraj government as well as representatives of militant groups.

Moscow realizes that few world powers see Fayez al-Serraj, current prime minister of the Tripoli-based Government of National Accord, as a leader who can unite the country, and sees an opportunity to make him part of its own political design for Libya. This strategy also allows Russia to put more pressure on unruly Hifter and make its support for him conditional on his participation in transitional talks.

Russia would arguably prefer a strong military figure who can channel its interests, such as Hifter, assume a significant role in any future Libyan government. For that to eventuate; however, it needs to bring all sides to the table, and achieve what Western powers have thus far failed to accomplish: pressuring competing Libyan factions into a compromise that produces a legitimate, national government recognized by all. The jury is out on whether it will succeed, but Russian leaders appear to be of the opinion that they’re up to the job.