YEREVAN, Armenia -- Russian troops stationed in Armenia have detained a Russian soldier suspected of shooting dead a family of six.

The Russian Border Guards command in Armenia said that following a nationwide hunt the soldier was detained Tuesday while trying to cross from Armenia into Turkey.

Armenian officials said the soldier, Valery Permyakov, who was serving at a Russian military base in Armenia, deserted from his unit and is suspected of killing the family at their home in the city of Gyumri early Monday. The only family member to survive the massacre was a 6-month-old baby, who suffered stab wounds.

A Kalashnikov assault rifle was found at the victims' home along with the suspect's military boots bearing his name.

Russia, Armenia's main sponsor and ally, offered condolences and assistance in the investigation.