Here's what Wiki has to say about lines in the sand:
"A line in the sand is, metaphorically, a point beyond wich no further advances will be accepted or made."
The Spartans used a line in the sand in defense of Greece. The Romans, Maori, and Alamo defenders all used lines in the sand to divide between here and there, between those for and against.
"The phrase may also be used to denote an invisible or implied boundary or rule, which may be easily transgressed by those unaware of its existence. This is precisely because of the ephemeral nature of a line drawn in the sand which quickly disappears however emphatically it may have been drawn in the first place. This means that transgressors are usually unaware that they have "crossed the line" until too late.