The long-running Libyan civil war appears to be staggering toward a finale. In recent days, the forces of Gen. Khalifa Haftar, who controls the marginalized east and south of the country, have been forced to withdraw from their stalled offensive against the capital, Tripoli. It is a triumph for the internationally recognized Government of National Unity, led by the elected prime minister, Fayez al-Sarraj.

But the fighting is not simply a domestic issue — Libya’s civil war has become a proxy for regional and global power geopolitics. It is also a legacy of the way in which the West abandoned the country a decade ago.

The Tripoli government is supported strongly by Turkey, while Haftar’s coalition is backed by Russia, Egypt, the United Arab Emirates, France and a smattering of other nations operating clandestinely. Haftar’s defeat may be an opening for a negotiated settlement, but it will require those outside nations to push the warring sides to the table. The United States and European Union also have a role to play.