"Twenty terrorists have been arrested. The territory of the police station has been liberated", the security service said in a statement.
The special anti-terrorist operation was conducted on July 30-31.
Earlier on Sunday, the group said it was going to surrender.
The militants' surrender is a result of "consistent and coordinated actions" of special units of Armenia’s law enforcement agencies, the statement continued.
On July 17, the armed group took several police officers hostage at the traffic police station in the Erebuni district of Yerevan. During the attack a policeman was killed and six more people were injured, including five police officers. Since then the group has released hostages kept during the attack, but captured ambulance staff, who came to the station to assist the wounded.
On July 30, the attackers opened fire and killed a policeman.
The armed group demanded the resignation of Armenian President Serzh Sargsyan and the release of Jirair Sefilian, an opposition politician and founder of the New Armenia Public Salvation Front.