If a country is weakening, internal and external problems will exacerbate. When internal issues cannot be addressed, chaos ensues, and this in turn weakens the external defensive measures. Internal chaos can open up a hole that may allow external forces to infiltrate. At first, benign problems may occur such as immigration, but the longer a country stays weakened, the problems will only grow worse and may lead to even more problems.
A weak country may lose resources in protecting one’s border. As a border becomes lawless, crimes from neighboring countries will pour in. As foreign criminals take root in a weakened country, such a country will have to deploy even more resources to combat growing crimes. Since the country is already internally weakened, resources will not be easily deployed, and so the internal issues won’t be effectively confronted.
The longer the country cannot address internal issues, the influences and abilities of such a country can only grow weaker, because external forces will most likely attack the weaknesses of such a country. In my opinion, if diplomacy cannot be used to solve external issues in the near term, it’s wiser to address the internal issues immediately. Only when internal issues are no longer the problems, then the country can confidently face external issues with more resolves.
Afterthought: I think it’s very important to keep the border tight, and only allow legal immigrants to apply for stays within a country. Tight border can prevent foreign crimes to pour in, thus helping a country to save resources for other internal issues.