16 Now behold, one came and said to Him, "Good Teacher, what good thing shall I do that I may have eternal life?"
17 So He said to him, "Why do you call Me good? No one is good but One, that is, God. But if you want to enter into life, keep the commandments."
Matt 19:16-17 (NKJV)
This is how we are saved through grace by faith:
John 6:29
28 Then they asked him, What must we do to do the works God requires? 29 Jesus answered, The work of God is this: to believe in the one he has sent.
I believe both are true.
Without Jesus Christ in our hearts as Lord and Savior we can follow the commandments all we want and it won't mean a thing. We need Jesus.
But after we accept Jesus we are obligated to follow His commandments. I don't mean the law given to the Jews, I mean the ten commandments that Jesus Christ Himself reiterated and expanded on in the New Testament. He even expanded on divorce. Christ took some of His very precious time to make sure we understood what was pleasing to God and that we also understood that doing what is pleasing to God is important.
Once you accept Jesus and He resides in you following the ten commandments should become a no brainer, but the ten commandments alone cannot save.
I think when Jesus is truly your savior you want to fullfill the two commandments below... And If you achieve those two the ten commandments fall into place automatically.
Mark 12
29 And Jesus answered him, The first of all the commandments is, Hear, O Israel; The Lord our God is one Lord:
30 And thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength: this is the first commandment.
31 And the second is like, namely this, Thou shalt love thy neighbour as thyself. There is none other commandment greater than these.
32 And the scribe said unto him, Well, Master, thou hast said the truth: for there is one God; and there is none other but he:
33 And to love him with all the heart, and with all the understanding, and with all the soul, and with all the strength, and to love his neighbour as himself, is more than all whole burnt offerings and sacrifices.
34 And when Jesus saw that he answered discreetly, he said unto him, Thou art not far from the kingdom of God. And no man after that durst ask him any question.
Mathew 22
35 Then one of them, which was a lawyer, asked him a question, tempting him, and saying,
36 Master, which is the great commandment in the law?
37 Jesus said unto him, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind.
38 This is the first and great commandment.
39 And the second is like unto it, Thou shalt love thy neighbour as thyself.
40 On these two commandments hang all the law and the prophets.
Luke 10:25-28
25 And behold, a certain lawyer stood up and tested Him, saying, "Teacher, what shall I do to inherit eternal life?"
26 He said to him, "What is written in the law? What is your reading of it?"
27 So he answered and said, "'You shall love the Lord your God with all your heart, with all your soul, with all your strength, and with all your mind,' "
28 And He said to him, "You have answered rightly; do this and you will live."