There was a time, not that long ago really, when Donald J. Trump said he cared about the sanctity of classified information. That, of course, was when his opponent was accused of jeopardizing it and it was a useful political weapon for Mr. Trump.

Throughout 2016, he castigated Hillary Clinton for using a private email server instead of a secure government one. “I’m going to enforce all laws concerning the protection of classified information,” he declared. “No one will be above the law.” Mrs. Clinton’s cavalier handling of the sensitive information, he said, “disqualifies her from the presidency.”

Seven years later, Mr. Trump faces criminal charges for endangering national security by taking classified documents when he left the White House and refusing to return all of them even after being subpoenaed. Even in the what-goes-around-comes-around department of American politics, it is rather remarkable that the issue that helped propel Mr. Trump to the White House in the first place now threatens to ruin his chances of getting back there.

The indictment handed up by a federal grand jury on Thursday at the request of the special counsel Jack Smith effectively brings the Trump story full circle. “Lock her up,” the crowds at his campaign rallies chanted with his encouragement. Now he may be the one locked up if convicted on any of the seven reported counts that include conspiracy to obstruct justice and willful retention of documents.

The indictment is the second brought against the former president in recent months, but in many ways it eclipses the first in terms of both legal gravity and political peril. The first indictment, announced in March by the Manhattan district attorney, charged Mr. Trump with falsifying business records to cover up hush money to an adult film actress who alleged that they had a sexual tryst. The second is brought by a federal prosecutor representing the nation as a whole, the first in American history against a former president, and concerns the nation’s secrets.

While Mr. Trump’s defenders have tried to brush off the first as the work of a local elected Democrat concerning issues that, however unseemly, ultimately seem relatively petty and happened before he took office, the latest charges stem directly from his responsibility as the nation’s commander in chief to safeguard data that could be useful to America’s enemies.

Republican voters may not care if their leader slips money to a porn star to keep quiet, but will they be indifferent about impeding authorities seeking to recover clandestine material?

Perhaps. Mr. Trump certainly hopes so. The Manhattan indictment only seemed to boost his poll ratings rather than hurt him. And so he immediately cast the latest indictment as part of the most extravagant conspiracy in American history, one that in his telling seems to involve a wide range of local and federal prosecutors, grand jurors, judges, plaintiffs, regulators and witnesses who have all lied for years to set him up while he is the one truth teller, no matter what the charges.

“I never thought it possible that such a thing could happen to a former President of the United States, who received far more votes than any sitting President in the History of our Country, and is currently leading, by far, all Candidates, both Democrat and Republican, in Polls of the 2024 Presidential Election,” he wrote on his social media site, making multiple misleading assertions in a single sentence. “I AM AN INNOCENT MAN!”

So far, his core supporters have stuck with him and even some of those running against him for the Republican nomination next year have criticized the investigations against him. But he recently was found liable for sexual abuse in a civil trial, his company has been found guilty of 17 counts of tax fraud and other crimes and he still faces two other possible indictments stemming from his effort to overturn his 2020 election defeat, leading to the attack on the Capitol on Jan. 6, 2021.

The question, politically at least, is whether the accumulation of all those allegations will ultimately weigh him down among Republican voters who otherwise like him, especially if there is a third and maybe a fourth indictment. At least some of his rivals for the party nomination are counting on the fatigue factor eventually costing him support.

As for Mrs. Clinton, whether she was feeling a little schadenfreude on Thursday night, the defeated candidate herself was not saying. But she and her allies have long believed that the reopening of the email investigation by James B. Comey, then the F.B.I. director, just days before the 2016 election cost her the victory that so many polls had forecast.

Mr. Trump will try to turn this around on his pursuers, arguing that he is being persecuted because he has been indicted where Mrs. Clinton ultimately was not.

Never mind that the facts of the cases are different, that he seemed to go out of his way to intentionally thwart authorities trying to recover the secret documents for months while investigators concluded that Mrs. Clinton was not willfully trying to violate the law. But it will be a useful political argument for Mr. Trump to insist that he is a victim of double standards.

Why he did not recognize the potential danger of mishandling classified information and take more care about it given the 2016 campaign is another matter. But he spent much of his presidency disregarding concerns about the security of information and the rules about preserving government documents.

He disclosed highly classified information to Russian officials visiting him in the Oval Office. He posted sensitive satellite imagery of Iran online. He kept using an unsecured mobile phone even after being told it was monitored by Russian and Chinese intelligence agencies. He tore up official documents and threw them to the floor once he was done with them despite laws requiring that they be saved and cataloged, leaving aides to follow him collecting the ripped-up pieces and taping them back together.

Even when confronted with the consequences of his actions, he never expressed concern. He was the president, after all, and he could do what he pleased. Even during the investigation into the classified documents that he took to Mar-a-Lago, he has defended himself by asserting that he had the power to declassify anything he chose just by thinking about it.

But he is no longer president. Now he will face not just primary voters who will decide whether he has been disqualified from the presidency, but a prosecutor who says he will enforce laws concerning the protection of classified information.

He will be booked as an accused criminal and, absent an unforeseen development, ultimately will be judged by a jury of his peers.

What a difference seven years makes.