A court in Armenia has freed the country's former president from jail as his trial continues on charges connected to a deadly police crackdown on a demonstration a decade ago.

The decision Saturday to release Robert Kocharian from custody brought hundreds of protesters into the center of Yerevan, the capital.

Kocharian had been jailed since December in the case. He is charged with violating constitutional order for ordering the 2008 crackdown, in which eight demonstrators and two police officers died. The demonstration was protesting results of an election two weeks earlier that declared Serzh Sargsyan as Kocharian's replacement as president.

The court released Kocharian under a personal guarantee from the head of the Armenian separatist Nagorno-Karabakh region of Azerbaijan. Kocharian is a former leader of the separatist government.