A peace deal in South Sudan will benefit the Sudanese president in more than one way.

Last week, the warring parties in South Sudan agreed to a “permanent” ceasefire, raising hopes of a peace deal to end a devastating civil war that has left tens of thousands of people dead and driven four million others from their homes since December 2013.

South Sudanese President Salva Kiir and opposition leader Riek Machar signed the landmark document in the Sudanese capital, Khartoum on June 27. Sudanese President Omar al-Bashir, who helped broker the deal, was also present at the signing ceremony.

As part of the ceasefire agreement, Kiir and Machar agreed to permit members of the African Union and another regional group, the Intergovernmental Authority on Development, to deploy peacekeeping troops to South Sudan. The two leaders also voiced their intention to form a new, transitional government to rule the country for 36 months leading up to national elections. The government of South Sudan also agreed to rehabilitate its oil fields in collaboration with the government of Sudan, and increase its oil production levels.

The move has been praised across the region as an important step towards bringing lasting peace and stability to the world’s youngest nation-state. But in less than a week, peace efforts already faced major challenges.

The ceasefire entered into force on July 1 as agreed, however, it was violated within hours, with the government and armed opposition trading blame. Only a day later, on July 2, South Sudan’s government presented a bill to the parliament seeking to amend the Constitution to extend Kiir’s presidential term to 2021. The opposition immediately rejected the plan, arguing it would undermine the ongoing peace talks.

These developments raised doubts about both the opposition and the regime’s commitment to peace. Moreover, there are still major question marks about the intentions and credibility of the facilitator of the negotiations – Sudanese President Omar al-Bashir.

Bashir has been implementing strategies that helped destabilise South Sudan since the oil-rich country gained its independence from Sudan in 2011. So why did he help broker a ceasefire between Kiir and Machar? And, perhaps most importantly, can such a fragile deal facilitated by a dubious broker lead to sustainable peace?

Bashir as a deal broker

The process that led to the signing of last week’s permanent ceasefire started not in Khartoum, but in Addis Ababa. On June 21, Ethiopia’s new, reformist Prime Minister Abiy Ahmed hosted a private dinner between Kiir and Machar. The two leaders, who until that night had not been in the same room since 2016, posed together for the cameras, yet nothing came out of Ahmed’s attempt to broker a deal.

After the apparent failure of Addis Ababa’s peace efforts, on June 25 the Inter-governmental Authority on Development (IGAD) announced that it would move the peace talks to Khartoum in a last attempt to push for peace.

By moving the negotiations from Ethiopia to Sudan the IGAD mediators and their international partners, namely the US, UK and Norway, took a well-calculated risk. They knew Bashir would not be an impartial mediator, but they had reason to believe he was the right person to push for peace.

Unlike Ahmed, Bashir has significant leverage over Machar’s and other South Sudanese rebel groups – which he had long been supporting – and can convince them to accept a compromise. Furthermore, Bashir stands to gain a lot from peace in South Sudan.

First, after failing to secure much needed financial support from Gulf countries, Bashir views the resumption of oil production in South Sudan as his last chance to save Sudan’s economy.

Second, he wants the US to remove Sudan from its “state sponsors of terrorism” list, and he knows he can impress the Trump administration by facilitating peace in South Sudan.

Third, he wants to divert attention from the political and economic crisis in his own country.

Fourth, he seeks to portray himself as a champion peacemaker, and Sudan as an “Island of stability” in the troubled region.

Who is behind the breakthrough in Khartoum?

So far, it seems that IGAD and its partners’ gamble has paid off. Bashir used his understanding of South Sudan’s internal dynamics and the leverage he has over South Sudanese opposition groups to deliver a much-needed breakthrough in the peace process.

Nevertheless, Bashir should not get all the credit for last week’s landmark ceasefire deal.

Khartoum’s efforts came at a time when the international community reached a consensus to end South Sudan’s devastating civil war. Parties to South Sudan’s conflict were also aware of this, and as a result, they were more motivated than ever to find common ground.

Also, prior to the signing of the ceasefire deal IGAD and its partners threatened to impose targeted sanctions on the top leaders of South Sudan, significantly helping Bashir’s peace efforts.

Moreover, Uganda’s President Yoweri Museveni, who was at Khartoum to oversee the signing of the ceasefire agreement, also played a crucial role in negotiations. Uganda has vital security and economic interests in South Sudan, so it is motivated to bring peace to the country.

It is not a secret that Museveni, who has long been providing military and political support to South Sudan’s government, has some leverage over President Kiir. Until recently, he has been vetoing any agreement that allowed Machar to have a prominent role in South Sudan’s government.

But it seems Bashir and Museveni finally reached an understanding regarding the future of South Sudan, making it possible for a ceasefire deal acceptable to both sides to be signed.

The way forward

But no matter who is responsible for the ceasefire – whether it is Bashir, Museveni, the warring parties or the international community – the group that will benefit the most from the cessation of hostilities will be the South Sudanese people.

What is important now is the shape the peace will take in South Sudan. If it is to be sustainable, peace in South Sudan should not be an elitist one. It should not come as a reward to those who have been waging the bloody war, or those who helped sustain it for years for their own benefit.

The coming peace should be a people’s peace.

Any peace agreement should not be about making different factions of the elite happy, it should be about finding the best way to govern South Sudan. Justice, accountability, healing and reconciliation are key to a lasting peace and the nation and state-building process South Sudan would soon need to embark upon. IGAD and its international partners should push for a peace agreement that commits the conflicting parties to a far-reaching reform agenda.

Bringing comprehensive and lasting peace to South Sudan is going to be a daunting task and actors like Bashir will undoubtedly try to manipulate the peace process to their benefit. The country is extremely militarised, ethicised and polarised by the ongoing civil war, previous interethnic wars and by the liberation war with Sudan. The region is also divided over South Sudan – from Sudan to Uganda, each regional power wants peace on their own terms.

But despite all this, there is now real hope for peace in South Sudan. It is likely that the parties will agree on security arrangements either tomorrow or over the weekend. The IGAD, AU, EU, US and all other concerned members of the international community should invest in South Sudan’s future. They should immediately establish the necessary mechanisms to effectively monitor the ceasefire and other provisions of the expected comprehensive peace agreement.

The international community used unlikely actors to score a ceasefire, now it’s their responsibility to make sure these actors do not kick-start a peace process that would help them more than the South Sudanese people.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.