Luke 18:10-14
10"Two men went up to the temple to pray, one a Pharisee and the other a tax collector. 11The Pharisee stood up and prayed about[a] himself: 'God, I thank you that I am not like other men—robbers, evildoers, adulterers—or even like this tax collector. 12I fast twice a week and give a tenth of all I get.'
13"But the tax collector stood at a distance. He would not even look up to heaven, but beat his breast and said, 'God, have mercy on me, a sinner.'
14"I tell you that this man, rather than the other, went home justified before God. For everyone who exalts himself will be humbled, and he who humbles himself will be exalted."
You see, the Pharisse had good works, and thought that he was right before God because he did the right things. BUT ....
It was the sinner, who could only cry to God for mercy, who was justified before God. Not by his works, but by his humble attitude, and crying out to God for mercy, trusting in the grace and forgiveness of God.