The remaining opposition gunmen holed up in a police station in Yerevan have laid down their arms, ending a two-week standoff with the Armenian authorities, which has left two police officers dead.
"With their consistent and coordinated actions, special units of Armenian law enforcement bodies have forced members of the armed group to surrender to the authorities," Armenia's National Security Service said in a statement on July 31. The statement said that 20 gunmen had been arrested, classifying them as "terrorists."
The National Security Service announced the "complete liberation" of the police compound more than an hour after the leader of the gunmen, Varuzhan Avetisian, said they had decided to give themselves up.
He said continued armed resistance would be meaningless, as security forces had been methodically shooting and wounding members of his group linked to a radical opposition movement, Founding Parliament.
Avetisian said his comrades chose to avoid further bloodshed and become "prisoners of war" instead. He sought to put a brave face on the surrender, saying that he and his comrades had succeeded in dramatically increasing antigovernment sentiment in Armenia.
The group reportedly had 30 or so members when it stormed and seized the police compound on July 17, demanding that President Serzh Sarkisian free Founding Parliament’s jailed leader, Zhirayr Sefilian, and step down.
They had also briefly held nine officers hostage.
People rally in Yerevan in support of the opposition gunmen occupying a police station on July 29.
Commentators said the standoff had dragged on in part because the government wanted to avoid stoking further social unrest. Several thousand people have joined nightly rallies to support the gunmen, occasionally clashing with police.
In the evening on July 30, demonstrators marched down Baghramian Avenue toward the main government buildings and presidential residence, but were stopped by riot police, who strung coils of barbed wire across the road.
The demonstrators blocked traffic for about two hours, but dispersed peacefully early on July 31 and no violence was reported.
And despite news of the gunmen's surrender, several hundred supporters gathered in a central square in Yerevan on the evening of July 31.
The armed men included veterans of the war in Nagorno-Karabakh with neighboring Azerbaijan, and were seen as national heroes by their supporters, who want the government to pursue a harder line on the issue.
Earlier, the gunmen denied killing a police officer who was shot dead by sniper fire on July 30.
Avetisian said on July 31 that police were wrong in accusing them of shooting the officer.
An ultimatum deadline from the authorities, who threatened to launch a full-scale assault against the gunmen, expired on July 30.
Police spokesman Ashot Aharonian said the 30-year-old policeman, Yuri Tepanosian, was killed by sniper fire as he sat in a police car parked "350-400 meters" from the compound.
The incident occurred just a few hours before the deadline was set to expire for the gunmen to leave the premises or face a full-scale assault.
Slain policeman Yuri Tepanosian
An RFE/RL correspondent heard several gunshots on a blocked street leading to the seized compound at around 6 p.m. local time on July 30, about an hour after the ultimatum issued by authorities had expired.
Late on July 30, thousands of supporters of the gunmen gathered in central Yerevan in a protest calling on the authorities not to use force to end the occupation.
Protester Albert Bagdassian told RFE/RL that their goal was "to support the group against which the security services have decided to launch an assault, to march on the street, to paralyze traffic and to show that we are not afraid."
Late on July 29, hundreds of supporters tried to march to the police compound, but were blocked by riot police.
Authorities said earlier on July 30 that 75 were injured in the clashes and more than 20 detained.
WATCH: Dozens Injured, Several Hospitalized After Yerevan Clashes
Three RFE/RL correspondents were among members of the media beaten with sticks and metal bars by men who appeared to be plainclothes police officers.
RFE/RL President Thomas Kent expressed "outrage" over the attack on journalists doing their job.
Authorities on July 30 promised to investigate.
Police said 165 people were rounded up during the July 29 demonstration and all but 26 were released.
With reporting by RFE/RL's Suren Musayelyan, AP, AFP, and dpa