Burundi's president promises to release 2,000 people detained during months of violent unrest, United Nations Secretary-General Ban Ki-moon said Tuesday while visiting the violence-plagued country.

Ban spoke after meeting with President Pierre Nkurunziza on Tuesday, as well as meetings with officials from Burundi's ruling party, government, opposition and civic groups in Bujumbura, the capital.

Ban said Nkurunziza's vow to release some prisoners is "an encouraging step" and urged the president to take more measures to promote peace. Ban said he was also heartened by the reopening of some media outlets and the cancellation of some arrest warrants. He arrived in Burundi on Monday on a mission to encourage dialogue between Nkurunziza and his opponents.

Ban and Nkurunziza spoke to reporters in a joint news conference Tuesday in Bujumbura.

"Burundi's political leaders must be willing to summon the courage and confidence that they make a credible political process possible and ensure that the people of this beautiful nation can once again live in peace and enjoy human rights," said Ban.

In his statement, Nkurunziza said he is ready to talk to his opponents and urged Ban "to persuade Rwanda to stop its aggression against Burundi." Rwanda has denied allegations it is training and arming rebels opposed to Nkurunziza.

Gun and grenade attacks continue to plague Bujumbura as Nkurunziza's supporters and opponents target each other.

More than 400 people have been killed in Burundi's current unrest which started in April when it was announced Nkurunziza would seek a third term, which he won. A new rebel movement has vowed to oust Nkurunziza from power by force.