As Balhae was a newly founded country, it adopted an open-door
policy to immigrants from neighboring kingdoms and tribes including
the Khitan (契丹) and Malgal
(靺鞨).
Large numbers of Khitans and Malgals were allowed
into Balhae and the Koreans became an ethnic minority in their own
country in less than a hundred years.
Unlike the Koreans, the Khitans and Malgals were Tungesic
nomads and it was impossible to integrate them fully into Korean
society though the Balhae kings had implemented policies to
assimilate them such as allowing inter-racial marriages between the
two groups.
While the Koreans retained control of the central
government and aristocracy, the administration and military became
dominated by the Khitans and Malgals which soon led to social
conflicts and civil wars between them.
During the last years of the Balhae kingdom, it
was wrecked by endless internal turmoils, ethnic strifes and
civil wars between the various races in the empire and it was
eventually conquered by the Khitan kingdom of Liao in 926
AD.
Taken from :
http://www.temasekreview.com/2010/03/23/how-uncontrolled-immigration-can-destroy-a-nation-the-case-study-of-the-korean-empire-of-balhae-%E6%B8%A4%E6%B5%B7/