OTTAWA -- The Canadian government is pulling all its diplomats and staff out of South Sudan over concerns for their safety.

Lynne Yelich, a Conservative minister of state, said in a release Friday that operations at Canada's office in Juba have been temporarily suspended and all staff moved to the Canadian high commission in Nairobi, Kenya.

"Due to operational challenges, including the unpredictable security environment in Juba," the government has temporarily closed the office, Yelich said.

The Canadian exodus comes as the South Sudanese government agreed Friday to end hostilities following a failed coup that has sparked escalating internal violence across the world's newest country since mid-December.

More than 120,000 people have been displaced by the fighting, which involves warring factions of the country's military.

While East African leaders meeting in Kenya hailed South Sudan's announcement of a ceasefire, the alleged renegade leader of the attempted coup remains a fugitive and was not party to the deal.

In a speech at the Nairobi summit, Kenyan President Uhuru Kenyatta noted there is "a very small window of opportunity to secure peace" in South Sudan.

South Sudan peacefully broke away from Sudan in 2011 after decades of a brutal war of independence fought against Sudan.

The young country has been plagued by corruption, ethnic tension, and a power struggle within the ruling party that pits President Salva Kiir against former vice-president Riek Machar.