The second federal indictment of Donald Trump describes conduct that posed a profound threat to our constitutional democracy — conduct that deserves serious punishment if proven. But the former president did not act alone. At least five and perhaps all six of the individuals who are alleged to have conspired with Mr. Trump to strip millions of Americans of their right to have their votes counted had a special duty to protect our constitutional system. They were lawyers.

In one sense, it would be easy to make too much of this fact. The former senior Justice Department official Jeffrey Clark and the former law school dean John Eastman, who seem plainly to be two of the unnamed co-conspirators, are hardly representative of the million-plus practicing lawyers in the United States. Thousands of lawyers, most of them career civil servants, served honorably in Mr. Trump’s administration.

A few, such as the senior Justice Department attorneys Jeffrey Rosen, Richard Donoghue and Steven Engle, risked their jobs to prevent Mr. Trump from enacting some of his darkest election subversion schemes. And lawyers appointed by Mr. Trump to the federal bench were likewise among the dozens of judges who rejected his meritless lawsuits challenging the election in the courts. These lawyers served as powerful checks against Mr. Trump’s authoritarian ambitions. Without them, his scheme could have worked.

But at the same time, the key role lawyers played in buttressing the former president’s plans speaks to a troubling crisis in the legal profession. The lawyers he conspired with — whose alleged conduct breached a host of rules of professional ethics, in addition to provisions of criminal law — did not emerge from whole cloth. They are the product of a profession that has changed over the past 40 years, in ways that tend to reduce the supply of Rosen-type lawyers in public roles, and increase the supply of Clarks. And unless we make changes in the structure of public lawyering and the professional path lawyers take to get there, we will not only lose one of our most effective checks against authoritarian power, we could accelerate its consolidation.

Scandals among presidential lawyers are, of course, hardly new. By the end of the Watergate revelations, no fewer than 29 lawyers — including two of President Richard Nixon’s handpicked attorneys general — faced sanctions for failing to check presidential misconduct, and lying to facilitate its commission. Both government and professional associations responded by adopting a revolutionary set of reforms, aimed at reinforcing the rule of law as a guardrail of constitutional democracy. The American Bar Association revised its influential model rules of professional ethics to make clear that lawyers who work for any organization, including the government, have a duty to report any unlawful acts of federal officials they encounter in the course of their work.

Similarly, the A.B.A. for the first time demanded that students at any American law school wishing to retain its A.B.A. accreditation complete a course in professional responsibility before graduation. Every future American lawyer, the idea was, would grow up in a profession in which ethical duties, including heightened requirements of truthfulness and candor, would be hard-wired.

Congress, too, considered proposals to radically reform government lawyering — from requiring the attorney general to belong to a different political party than the president, to making him or her fully independent of the executive branch (and free from the president’s supervision or interference). To stave off these more dramatic measures, President Gerald Ford’s attorney general ordered the creation of a new Office of Professional Responsibility, charged with reviewing allegations that any department employee was violating legal or ethical rules — an office that exists to this day. Members of both parties said they supported the goal: to make sure government lawyers consistently uphold the highest standards of professionalism in the public service.

The parallels in lawyerly misconduct between Watergate and today are evident: Mr. Eastman is facing “moral turpitude” charges in California, Rudy Giuliani faces disbarment in Washington, D.C., and they’re far from the only ones. Dozens of other lawyers who represented Mr. Trump in election litigation now face misconduct allegations in state disciplinary proceedings nationwide.

But the prospects for systemic reform seem far less promising than they did half a century ago. Today, the formally nonpartisan A.B.A., which 40 years ago claimed the membership of about half of American lawyers, now represents roughly a fifth of them, its influence supplanted in key respects by more partisan alliances, the conservative Federalist Society most influential among them.

The effect of this partisan shift has not been limited to the courts. From law school to law practice to government service, elite lawyers can today move through their careers along effectively parallel professional paths. Most major private law firms with Supreme Court practices today consistently show an evident preference for hiring former clerks from judicial chambers on the firm’s preferred side of the political spectrum. Lawyers hired as political appointees into the executive branch are likewise increasingly identifiable as on one partisan track or the other. Conservatives in recent decades have worked to expand the role of partisan lawyering further still, even attempting to give hiring preference to conservative lawyers in career government service positions, jobs that post-Watergate civil service laws aimed to insulate from exactly such partisan pressures. Such moves send a clear signal to young lawyers: ideological loyalty is a credential, not a disqualification.

In the meantime, the Office of Professional Responsibility conducts far fewer ethics investigations than it did even as recently as the 1990s; these days, its active caseload is almost nonexistent. And the highest profile government attorney ethics scandals in recent years have not only failed to result in discipline, but thanks to the modern system of professional rewards, breaking ethical rules in the interest of securing partisan advantage has even won some lawyers nominations to the federal bench.

In this environment, it is not hard to see why government lawyers like Mr. Clark and even nongovernment lawyers like Mr. Eastman might have come to believe that their best path to career success was to elevate partisan loyalty over professional ethics. And it is not hard to see why these incentives may prove devastating for constitutional democracy. The Trump case shows lawyers not only failing to make sure their government clients operate within the bounds of our democratic system, but stretching to help those clients craft ways to subvert it. The risk to the rule of law is equally apparent. For when lawyers trained in this way become judges, deciding cases in ways that appear to elevate partisan interests over professional norms, they undermine public confidence in the courts as impartial arbiters of social disputes.

There are a few short-term reforms Congress could enact that would help to guard against the most extreme cases of government attorney misconduct. It might start by amending some of the major existing statutes that empower the president — such as the Insurrection Act, which some Trump lawyers were keen to invoke. With changes, those statutes might at least better guide public lawyers who provide advice to elected officials. It is also possible to strengthen standards of professional accountability at the federal and state level, reminding lawyers and judges who lose track of their professional obligations to candor and truth.

Changing the increasingly polarized nature of the legal profession is a more complex enterprise — one centrally bound up in how we learn, teach, reward and punish what lawyers do. It is a long-term project. With little time to lose.

Deborah Pearlstein is professor of law at Cardozo Law School of Yeshiva University. This fall, she will join Princeton University as director of the Princeton Program in Law and Public Policy at the School of Public and International Affairs.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.