There are many, many aspects to this issue. From the broadest possible perspective, you can start from the vantage point that the world is not free. Humans have been given free will by Creator but are not free on their own home planet. They are controlled, manipulated, subverted, suppressed, and subjugated on many levels, as are all of their institutions. The fact that there is so much discord, so many points of contention, so many suspicions and hatreds, so many ways to mistrust and loathe one’s neighbor, those differing from the self. All create a state of affairs where society has progressed little beyond the early days when one’s clan was heavily defended and penetrated only with caution and suspicion on both sides to form new friendships or alliances.
This has continued with the growth of society to much, much larger numbers into the varying nation states with geographic territories that are stoutly defended with presumption of ownership and with the intention to exclude non-citizens, at least from full rights of those who are deemed to belong within the borders. This has served in one way to maintain a kind of order and to keep people more or less content in having a place to live and some freedom of movement within borders without being questioned or put under suspicion.
But this is far from an ideal existence because it leads to strife of all kinds. The doubts and suspicions, the branding, and the resulting discrimination, and differing opinions and emotions that follow that may lead to violence and warfare, are a direct consequence of creating separations based on any kind of criteria. And often the national boundaries are the flimsiest of reasons to do so, but the entirety of human affairs are created, and administered, and conducted on every level around the idea of the nation-state—with respect to governance, with respect to the tax structures, with respect to registration and the legal systems supporting property rights, individual freedoms, the conduct of financial affairs with monetary systems, and so forth.
Everything is geared to be a reflection of the fragmentation being maintained, so within that big picture scheme of the state of fragmentation, how one particular nation deals with its neighbors and people crossing its borders with or without permission, all follow from the reality it is part of an imperfect world to begin with. So nothing that defends the fragmentation can be considered divine. Everything that causes harm, suffering, and particularly long-term liabilities for those involved will have karmic consequences. And indeed, this is transferable to everyone involved in the region where the conflict arises as all have a karmic responsibility for what is around them and particularly those who they interact with and groups they belong to. You are far from solving this dilemma. It will really be quite some time yet and will require dealing with the problem of the interlopers who have helped to create this system before anything truly meaningful will override it.