Prosecutors in Macedonia say they have charged 30 people with terrorism-related offences following deadly clashes in the northern town of Kumanovo.
Some have also been charged with illegally possessing arms and explosives, a statement quoted by AFP news agency said.
Eight police officers and 14 gunmen were killed in the weekend clashes.
On Sunday, Macedonia said the armed group had been led by five Kosovans.
The interior ministry said they were members of the now dismantled Kosovo Liberation Army.
The state-run Macedonian Information Agency (MIA) reported on Monday that 18 of those being held are Kosovo nationals; 11 are Macedonian citizens, two of whom are living in Kosovo, and one is an Albanian national who had been living in Germany.
Authorities say the group had been preparing attacks against civilians and "strategic targets".
"The suspects have been accused of terrorism, jeopardising constitutional order and security," the prosecutor's office was quoted as saying.
A court in the capital Skopje ordered the 30 to be detained for 30 days, the MIA reported.
The violence followed an incident in April in which about 40 ethnic Albanians from Kosovo briefly took over a police station in the Macedonian village of Gosince, demanding the creation of an Albanian state within Macedonia.
About a quarter of Macedonia's population of two million are ethnic Albanians.
The clashes in Kumanovo, about 40km (25 miles) north of Skopje, destroyed several houses, and schools remain closed.
BBC Balkans correspondent Guy De Launey says the violence has revived uncomfortable memories of an insurgency 14 years ago that resulted in greater rights for Macedonia's large ethnic-Albanian minority.
However, a return to a wider conflict currently seems unlikely, he adds, with Macedonia's biggest problems being political rather than ethnic.
The government is facing mounting allegations of abuse of power and a large demonstration is planned at the weekend.
UN Secretary-General Ban Ki-moon said in a statement on Monday that he was alarmed by the latest clashes and he called for calm.
Macedonia, which is a candidate for European Union membership, is observing two days of mourning.