Second temple Judaism was not a religion of works righteousness. Judaism was always – and still is – a religion of electing grace and covenant relationship. Such faith is not found only in the Qumran community and documents from the late second temple period. "Election precedes covenant which is lived out by following Torah instruction" is the heart of Exodus 19-20 and Deuteronomy 6-7 – which is, in turn, the heart of the Hebrew scriptures. (This is also the heart of Jesus' and Paul's understanding and practice of Torah faithfulness.)
Paul clearly states in Galatians 2:15-16: "We who are Jews by birth and not sinful Gentiles know that a person is not justified by the works of the law." Torah was given in the context of covenant. Covenant was born from gracious election. To be Torah observant never meant living a life of "sinless perfection meriting salvation." Rather it meant to live under the umbrella of God's election and covenant, observing Torah instructions as moral and purity imperatives and availing one's self of the redemptive provisions of the sacrificial system when falling short.
The tendency to fall into legalism is an ever-present temptation in all expressions of ethical monotheism – and I am quite sure that some in second temple Israel succumbed to self-righteousness and exclusion of those who did not live up to their standards. But this is not the essence of biblical faith. Jesus did not find shortcomings in the law of Moses. And in whatever way we understand Paul (unless we want to admit that he is the true founder of the Christian faith), we must start with his fundamental agreement with Jesus' own faith and his proclamation that the "end of the age" was dawning. This proclamation included the defeat of the powers, the restoration of Israel, the inclusion of the Gentiles in the people of God, and the resurrection of the dead – of which Jesus is the first fruits and the certain guarantee that the "kingdom of God" has come. This vision is the fulfillment of the Hebrew faith, not its rejection.
Both Jesus and Paul were Torah observant Jews. Neither argued that Jews were no longer bound by Torah obligations. Jesus charged the Pharisees with hypocrisy, failing to live up to the standards they set for others; he never charged them with heresy. When asked the greatest commandment, he quoted Deuteronomy and Leviticus. To the rich ruler's question, he replied, "Observe the law." The context for interpreting the teaching of Jesus and Paul is Torah observant Judaism at the end of the "old age" and the coming of the "new." It is precisely the end time inclusion of the Gentiles – and their relationship to the traditional Hebrew faith – that raises the controversies that Paul struggles against in his letters.