I can't imagine there was a defined border in the Roman times, or even in the Greek city-states. Am I wrong? When did borders on maps first appear, rather than just one town belonging to Kingdom A and the other to Kingdom B?
It's the Peace of Westphalia (1648) which introduced clear territorial borders within which a state was sovereign - i.e. could rule without interference from other states.
See this answer by /u/Kartoffelplotz for lots of details. See also this answer, posted a few days ago by /u/elos_, on sovereignty after the Peace of Westphalia.