A government bill designed to tackle Armenia’s “criminal subculture” has stopped scores of Russian crime figures from migrating to the South Caucasus state, a senior Armenian official claimed on Friday.

Artur Goyunian, the head of the state Penitentiary Service, said that Armenia became a potential safe haven for them after Russia enacted similar legislation in April.

“Had we not passed such a bill in Armenia all criminals, representatives of the underworld, which include quite a few ethnic Armenians, as you know, would have moved to Armenia,” he told a news conference.

The bill passed by the Armenian parliament in the first reading last month criminalizes the creation of and membership in groups “carrying a criminal subculture” and outlaws underworld ranks granted to crime figures.

Holders of the highest of these ranks are known as “thieves-in-law” in the former Soviet Union. They name “overseers” of criminal activity in prisons or various regions.

Under the bill involving amendments to Armenia’s Criminal Code and Code of Procedural Justice, anyone receiving or granting such ranks will face between seven and ten years’ imprisonment. Having ties to such individuals will also be deemed a criminal offense.

Riots broke out in the country’s main prisons in early September shortly after the bill was drafted by the Justice Ministry and approved by the Armenian government.

Goyunian confirmed the connection between the two developments. He said that crime figures remaining at large organized the riots in protest against the planned legislation. Criminal proceedings launched against rioters defused tensions in the prisons, he added.

While stressing the importance of the bill, the official cautioned that it alone will not eliminate the “criminal subculture” and, in particular, underworld rules that have long regulated prison life in Armenia, Russia and other ex-Soviet states. He said the authorities should also raise the modest salaries of prison guards, improve prison conditions and draw up “individual plans” for inmates.

Earlier this month, Justice Minister Rustam Badasian announced government plans to shut down some of Armenia’s Soviet-era prisons and build new and more modern penitentiary facilities in their place.