restrain from

restrain someone from something

to prevent someone from doing something. I had to restrain her from hurting herself. I was unable to restrain myself from giggling at the wisecrack.