Keep (someone) from (doing something)

To prevent someone from doing something.

I tried hard to keep my friend from buying a new car.