prevent evil

Is it OK to do evil in order to prevent a much bigger evil?