I'm not a lawyer, but I think laws against trespass are fairly straightforward just about everywhere. When you are asked repeatedly to leave, and you don't, you're trespassing. Just because he was invited doesn't mean he can stay as long as he likes.
However, nor does the principal's convenience define "trespassing." Was there a set time limit? A written policy? Did he attempt to stay beyond the time the building is available for use?
Police should ask a few questions before whipping out the cuffs.