I was recently arguing with a friend that the idiom "in check" comes from chess. With the meaning that keeping someone or something "in check" restrains its choices and limits its actions, this seems to match the chess meaning. (When you are in check, you have to save your king and hence cannot make any other moves.)
However, I could not find a suitable etymology to prove this. It's also possible that both come from a common meaning of restraint.
Is there evidence that this idiom comes from chess?