Seventeen alleged coup leaders have appeared before a prosecutor in Burundi, their lawyer said, the day after the failure of an attempt to overthrow the country's president.

The group that appeared in the high court on Saturday included General Cyrille Ndayirukiye and top police commissioners Zenon Ndabaneze and Hermenegilde Nimenya, who are accused of "attempting to overthrow the state", lawyer Anatole Miburo said.

Coup leader Godefroid Niyombare, a general and ex-intelligence chief, was said to be still at large.

The lawyer alleged that they were beaten after their arrest on Friday, two days after Niyombare launched the bid to overthrow the president.

"They were seriously beaten, in particular General Ndayirukiye," he said, saying the general had been forced to record a confession for broadcast on state media.