Interesting question. I thought I was taking a break from answering questions but here we are.
What keeps a person from being enlightened? The ego. What is the ego? Ego is any mental block keeping you from seeing the world in a more transcendent way. Think about the people that you know that have ‘lesser egos’. Do they have more mental blocks or fewer of them?
How do these mental blocks begin? Well they start off as ignorance. Say you don’t have an answer for something you have a question about. Your mind comes up with an answer. Your ego is going to determine what ‘level’ that answer is at. If your answer to “My dad loves my brother more than me,” is to kill your brother, then you have a great great number of mental blocks to work with, that’s keeping you from less violent and more constructive responses.
Substitute dad with God and you have the story of Cain and Abel in the Bible. What was God’s response to Cain killing Abel? God took away Cain’s ability to farm and sent him out into the world. He put a mark on Cain so that nobody would kill him even though he was a stranger. This is a non-violent response to a violent act.
Violence doesn’t involve just killing or hurting people, but also inner turmoil and strife. Things you do can increase your own or others’ inner turmoil. Ego involves all the wrong things you can do in response to this sort of thing. Let’s separate responses into four categories.
The first is chaos, the second is evil, the third is self-sacrifice, and the last is enlightened. Enlightened people almost never have the first three categories of response. I say almost because God / the universe often works in mysterious ways that you often won’t be able to get direct feedback on.
Ok, so did God’s act increase or reduce the amount of turmoil in Cain’s mind? Well it decreased it in a very important aspect, he won’t be inclined to kill someone he is jealous of in the future, but it increased it in a different way. Cain was a farmer, it’s all he knew. God sending him out in the world is a kind of punishment, but it’s also a kind of blessing in disguise. Cain and his son found a city. When you can do something for someone that has long reaching beneficial effects, that’s a wise act.
There are other aspects to enlightenment, but this is the moral / ego aspect.