Other than international treaties, it's a threat to stability. Not only in the middle east, but in Turkey, Greece, the Balkans, Europe as whole and the European Union as an entity. History doesn't really care what you think you owe or don't owe anyone. The question is what you can afford, especially with the change in geopolitics like the rise of China. On the other hand considering the quality of your other comments on HN I'm not even sure why I'm writing this.
Sweden is free to do what they want, just like other countries can decide their own foreign policy.
I'm not saying I support building walls at the border, but again, countries are free to do what they want with their territory, they don't owe anything to refugees or other nations.