An agreement has finally been reached on how to prosecute Khmer Rouge leaders accused of genocide in Cambodia decades ago.

On Saturday, U.S. Senator John Kerry said he expected a final deal to be signed by June 15.

Cambodia and the United Nations discussed the establishment of a tribunal for months but were unable to agree on who would be in charge.

Cambodia initially wanted full control, but the United Nations insisted only international supervision would guarantee proper standards of justice.

Now, Cambodian Prime Minister Hun Sen has agreed to accept the proposal the United Nations put forward April 18.

The final sticking point of negotiations was the role of co-prosecutors in the trial. The proposal states that disputes between prosecutors — one Cambodian and one foreigner — are to be resolved by a panel of judges, Kerry said.

Cambodia's parliament is set to debate a draft law on the tribunal in its next session starting May 23, and a final deal is expected to be signed soon afterwards.

During its savage reign the Khmer Rouge turned the country into a vast work camp, slaughtering many people and leaving others to starve to death.

The communist guerillas are blamed for about 1.7 million deaths between 1975 and 1979, when they were finally ousted from power by a Vietnamese invasion.

It's not known how many people will be tried for genocide. Only two top Khmer Rouge leaders are now in custody. At least a dozen more are still alive — many in the 70s and in poor health.