During the Soviet era, Azerbaijanis were historically the second largest population in the country (forming about 2.5% in 1989). However, due to the conflict over Nagorno-Karabakh, virtually all of them emigrated from Armenia to Azerbaijan. Conversely, Armenia received a large influx of Armenian refugees from Azerbaijan, thus giving Armenia a more homogeneous character.