The American Bar Association today climaxed five years of heated debate over a new lawyers' code of ethics by overwhelmingly defeating a proposal that would have given lawyers greater freedom to expose wrongdoing by clients.

Instead, in what critics called a major step backward, the organization voted to expand the situations in which lawyers must keep quiet to preserve lawyer-client confidentiality.

The only significant exception would be to allow an attorney to forgo the secrecy code to prevent a client from committing a crime "likely to result in imminent death or substantial bodily harm."

Prevention of harm to property or someone's financial interests also would have justified disclosure under the measure defeated today.

Under the rule approved today, for example, a lawyer who reported to authorities that his client lied in describing a securities offering to potential investors could face disciplinary action.

The code currently in force in most states might have allowed that disclosure. The proposal defeated today would have explicitly permitted it.

Opponents of the defeated code, such as John Elam of the American College of Trial Lawyers, argued that it would make lawyers "watchmen or policemen over their clients" and "strike at the heart" of the traditional attorney-client privilege.

The 207-to-129 vote of the association's house of delegates today resolved one of the most contentious issues within the legal profession. The proposal was part of a total revision of the Model Rules of Professional Conduct--the lawyers' code of ethics--under way since 1977.

Although not automatically binding on lawyers, the revision will serve as the primary guide used by state bar associations and state courts in designing disciplinary rules.

The bar association will continue to consider the overall revisions this week as well as during sessions next summer.

Robert W. Meserve, chairman of the commission conducting the revision, said he believed today's action "substantially damaged" the entire effort.

The association also defeated, 188 to 133, a second controversial proposal which would have allowed corporate lawyers to take "remedial action," including disclosure, against corporate wrongdoing when internal efforts against it have failed.

Opponents, again led by the trial lawyers, said this provision would make lawyers self-appointed "consciences" of their corporations. Instead, the delegates voted to allow the lawyer simply to resign when he doesn't like what's going on in a corporation.

The confidentiality provisions were by far the most controversial of the suggested revisions. They were, in part, a reaction to the involvement of dozens of lawyers in the Watergate scandal.

The general prohibition against divulging clients' secrets was not at issue today.

The debate revolved around exceptions to that prohibition. The current rules generally permit disclosure when a client intends to commit a crime, or when the attorney is under a court order. These rules are subject to widely differing interpretations.

The commission proposal defeated today explicitly allowed disclosure to prevent a crime or fraudulent act whether it involved violence or "substantial injury to the financial interests or property of another," and to rectify the consequences of such wrongdoing after it has occurred.

The version finally approved today was backed primarily by the American College of Trial Lawyers, which was concerned about the impact on relations with criminal defendants of the more liberal rules. It argued that the changes would have undermined that relationship, making clients wary of confiding the truth to a lawyer.

The trial lawyers group also said the proposal would put lawyers in jeopardy in criminal and legal malpractice proceedings.

A lawyer called before a grand jury, according to the trial lawyers, no longer could refuse to divulge information by claiming the attorney client privilege.

Those favoring the expansion of the exceptions said it merely would give lawyers discretion to disclose wrongdoing, would not require anything and would help change the "mouthpiece image" of lawyers.