The long-awaited Khmer Rouge trials in Cambodia are ready to start, after a panel of judges approved ground rules.
Two million people are believed to have died under the Khmer Rouge
The deal was reached in a week-long meeting, after a delay of more than six months because of disagreements between local and UN-appointed legal officials.
The tribunal is expected last for three years, with trials starting in 2008.
As many as two million are thought to have died during the four years of Khmer Rouge rule in the late 1970s, but no-one has ever faced charges.
The movement's former leader, Pol Pot, died nine years ago.
But the regime's former head of state, Khieu Samphan, and Foreign Minister Leng Sary have both been living freely in Cambodia.
KHMER ROUGE TRIBUNAL
Will try cases of genocide and crimes against humanity
Five judges (three Cambodian) sit in trial court
Cases decided by majority
Maximum penalty is life imprisonment
Budget of $56.3m
Tribunal co-prosecutor Robert Petit said the rules had been agreed unanimously by the panel.
"These rules will ensure us fair and transparent trials," he told reporters.
Almost a third of the court's three-year mandate has already passed, but Mr Petit says the time has not been wasted.
"Given all the complexities and after intensive work and consultations, we are pleased to have finalised the rules in a reasonable time. It has been a worthwhile process and it has been essential to take time to prepare this draft."
The local and international legal officials had struggled to find ways to incorporate international law into proceedings that fall under Cambodian jurisdiction.
But after months of negotiations, they have settled their differences, says the BBC's Guy Delauney in Phnom Penh.
Foreign lawyers will now be allowed to represent defendants and victims may file complaints to the courts as long as they do so as a group.
It means the courts will be able to move forward with the process of prosecuting former Khmer Rouge leaders.
The prosecutors say they will be ready to hand over the files to the investigating judges within weeks, our correspondent adds.
Official confirmation of which former Khmer Rouge leaders will be charged should follow.
A meeting in November last year ended in disarray - and the future of the process looked bleak.
A similar meeting last year ended without agreement
But this time the mood was cordial.
Earlier, officials told the BBC that there were no serious disagreements during the meeting.
Many of the legal officials have had little to do during the long hiatus caused by the dispute, although prosecutors have continued to compile evidence.