South Sudan's President Salva Kiir attends a ceremony marking the 34th anniversary of the Sudan People's Liberation Army. File picture: Bullen Chol/AP

Juba - South Sudanese President Salva Kiir released 30 political prisoners, after months of pressure by human rights activists, presidential spokesman Ateny Wek Ateny said Friday.

The prisoners, who had been detained without trial, many of them for several years, had been released on Thursday as part of a presidential amnesty with the aim of "enhancing national dialogue" in the volatile East African nation, the spokesman said.

Among the released detainees is James Gatdet Dak, the former spokesman of rebel leader Riek Machar, the president's biggest political rival, according to Ateny.

The amnesty was granted after various human rights groups repeatedly urged Kiir to free political prisoners.

Kiir's security services and army have conducted arbitrary arrests and prolonged detentions of perceived government opponents, according to Amnesty International.

Detainees have been subjected to torture and other ill-treatment, according to the human rights group.

South Sudan has been in the grip of a military conflict since a split between Kiir and Machar escalated in December 2013.

Tens of thousands have been killed and 3.5 million displaced in what is now the world's third-biggest refugee crisis after Syria and Afghanistan, according to the UN Refugee Agency (UNHCR).