Pope's dramatic gesture came as he urged the previously warring leaders to not return to a civil war.

Pope Francis, in a dramatic gesture after an unprecedented retreat at the Vatican, knelt to kiss the feet of South Sudan's previously warring leaders on Thursday as he urged them to not return to a civil war.

He appealed to President Salva Kiir, his former deputy turned rebel leader Riek Machar, and three other vice presidents to respect an armistice they signed and commit to forming a unity government next month.

"I am asking you as a brother to stay in peace. I am asking you with my heart, let us go forward. There will be many problems but they will not overcome us. Resolve your problems," Francis said in improvised remarks.

The leaders appeared to be stunned as the 82-year-old pope, who suffers from chronic leg pain, was helped by aides as he knelt with difficulty to kiss the shoes of the two main opposing leaders and several other people in the room.

His appeal was made even more pressing as anxiety grew in South Sudan that Thursday's coup in neighbouring Sudan might put at risk the fragile peace deal that ended South Sudan's brutal five-year civil war.

The Vatican brought together South Sudanese leaders for 24 hours of prayer and preaching inside the pope's residence in an attempt to heal bitter divisions before the country is due to set up a unity government.

"There will be struggles, disagreements among you but keep them within you, inside the office, so to speak," Francis said in Italian as an aide translated into English. "But in front of the people, hold hands united. So, as simple citizens, you will become fathers of the nation."

Sudan, which is predominantly Muslim, and the mainly Christian south fought for decades before South Sudan became independent in 2011. South Sudan plunged into civil war two years later after Kiir, a Dinka, fired Machar, from the Nuer ethnic group, from the vice presidency.

About 400,000 people died and more than a third of the country's 12 million people were uprooted, sparking Africa's worst refugee crisis since the 1994 Rwandan genocide.

The two sides signed a power-sharing deal in September calling on the main rival factions to assemble, screen and train their respective forces to create a national army before the formation of a unity government next month.

In his prepared address earlier on Thursday, Francis said South Sudan's people were exhausted by war and the leaders had a duty to build their young nation in justice. He also repeated his wish to visit the country along with other religious leaders to solidify the peace.

Others who attended the retreat were the Archbishop of Canterbury, Justin Welby, who is spiritual leader of the worldwide Anglican community, members of the South Sudan Council of Churches, and other Catholic and Presbyterian Church leaders from Africa. Welby had proposed the idea of the retreat to the pope.