(This April 11 story corrects to remove reference to rebel group led by Cirillo)

JUBA (Reuters) - Thursday’s military coup in Sudan sparked anxiety in neighboring South Sudan that the toppling of longtime President Omar al-Bashir could scupper a fragile agreement that ended South Sudan’s five-year civil war.

South Sudanese President Salva Kiir and former rebel leader Riek Machar signed a peace agreement last year that calls on them to form a unity government on May 12. But key requirements - including integrating their forces - have not been met.

The deal was guaranteed by Sudan, but the ouster of Bashir transfers much more responsibility for the success of the agreement to former arch-enemies Kiir and Machar, said Alan Boswell, a senior analyst with Brussels-based think tank International Crisis Group.

In Sudan, Defence Minister Awad Mohamed Ahmed Ibn Auf announced the end of Bashir’s rule, saying the country would enter a two-year period of military rule to be followed by presidential elections.

Both the South Sudanese government and former rebels expressed alarm over the coup.

“Sudan labored so hard to restore peace and stability and because of that we have the current prevailing peace agreement in South Sudan and it is a guarantor,” Martin Elia Lomoro, South Sudan’s cabinet affairs minister, said in a meeting with international ceasefire monitors.

Former rebel representative Stephen Pal Kuol said rebels were also worried.

“The opposition also seconded the position of the government,” he said.

Sudan, a largely Muslim nation, granted the largely Christian south its independence in 2011 after decades of scorched-earth fighting. Two years later, South Sudan plunged into its own intermittent civil war, with some 400,000 people killed and nearly a third of the population uprooted.

In the peace efforts, Machar’s former rebels are friendless and penniless, giving Kiir the upper hand.

But Kiir might still be willing to form a unity government with Machar if Kiir thinks he can improve relations with foreign powers and consolidate his power, said the International Crisis Group’s Boswell.

“Kiir holds the cards. It depends if Kiir wants to concede enough to end the war,” Boswell said. “There is no longer much external pressure to keep this peace process moving forward ... it could all fall apart or it could put fire under their feet to move forward on their own.”

Despite the conflict and a still-festering border dispute, relations between Sudan and South Sudan have warmed in recent months. Both countries desperately needed the cash generated by oil from South Sudan flowing through a pipeline and port owned by Sudan.

The Vatican brought together South Sudanese leaders, including Kiir and Machar, for 24 hours of prayer and preaching on Wednesday, an attempt to heal their bitter divisions.