The opposition gunmen holed up in a police station in Yerevan laid down their arms late on Sunday, 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 (NSS) said in a statement.

The statement said that 20 gunmen were arrested, classifying them as "terrorists."

The NSS announced the “complete liberation” of the police compound located in the city’s southern Erebuni district more than an hour after the leader of the gunmen, Varuzhan Avetisian, said they have decided to give up themselves.

Speaking to the 1in.am news service by phone, Avetisian said continued armed resistance would be meaningless as security forces have been methodically shooting and wounding members of his group linked to a radical opposition movement, Founding Parliament.

Armenia - Varuzhan Avetisian, a leader of an armed group that seized a police station in Yerevan, 23Jul2016.

“We have shrunk substantially, there are approximately 20 of us remaining [barricaded inside the compound,]” Avetisian said.

In these circumstances, he went on, the armed oppositionists chose to avoid further bloodshed and become “prisoners of war” instead.

The group reportedly had 30 or so members when it stormed and seized the Erebuni compound on July 17, demanding that President Serzh Sarkisian free Founding Parliament’s jailed leader, Zhirayr Sefilian, and step down. They killed one police officer and wounded several others during the attack.

The authorities repeatedly rejected the gunmen’s demanding, insisting on their unconditional surrender. They gave the gunmen until Saturday evening to surrender or face a large-scale security operation. Another policeman was shot dead shortly after the expiry of the ultimatum.

Avetisian sought to put a brave face on the surrender, saying that he and his comrades have succeeded in dramatically increasing anti-government sentiment in Armenia.

“We consider our mission to have been accomplished,” he told 1in.am. “We have caused the people to rise up.”

Armenia - People rally in Yerevan in support of opposition gunmen occupying a police station, 29Jul2016.

The oppositionist, who was primarily known as Founding Parliament’s chief spokesman before the attack, referred to virtually daily demonstrations that have been held in Yerevan for the past two weeks in support of his armed group. He said at the same time that the gunmen have failed to topple the ruling regime also because “the people were a bit slow to get going.”

The protests organized by senior Founding Parliament members and other opposition figures drew up to several thousand people. They seemed to have lost momentum after the vast majority of the protest leaders were arrested by Saturday.

Most of them now risk prosecution on charges stemming from violent clashes between riot police and protesters which broke out near the seized police compound on Friday night. The police have been widely accused of using excessive force against the protesters.

The few protest leaders remaining at large said on Sunday morning that they are suspending the campaign because of the arrests. Nevertheless, about a thousand people sympathetic to the gunmen again rallied in Yerevan’s Liberty Square and then marched through the city center in the evening.

A fringe nationalist group favoring a hard line on the Nagorno-Karabakh conflict, Founding Parliament has for years attempted to force Sarkisian into resignation with peaceful demonstrations. It held a series of such protests in December together with several other small opposition groups. Their campaign fizzled out due to poor attendance at those rallies.

Armenia -- An armed man speaks to the press after pro-opposition gunmen locked in a week-long hostage standoff with Armenian authorities released the final four police officers held captive in Yerevan, July 23, 2016

Early this year, Sefilian tried unsuccessfully to team up with more moderate opposition parties represented in Armenia’s parliament for another push for regime change.

On June 20, Sefilian was arrested for allegedly acquiring large quantities of weapons and forming an armed group to seize government buildings in Yerevan. The Lebanese-born oppositionist and his associates denied the charges as politically motivated.

Founding Parliament repeatedly demanded its leader’s release in the following weeks. It claimed that Sefilian is prosecuted because he planned to thwart Armenian territorial concessions which President Sarkisian allegedly plans to make to Azerbaijan.

Following the shock attack on the Erebuni police compound, Sarkisian reportedly expressed readiness to meet with Sefilian and discuss his demands if the gunmen agree to surrender. Sefilian insisted, however, that he would negotiate with the president only after being allowed to meet his armed supporters holed up in the compound. He said Founding Parliament is prepared to reach compromise agreements with Sarkisian.