It has been a long week for the National Security Agency. Last Monday, a federal judge ruled for the first time that the agency’s continuing sweep of Americans’ phone data — a once-secret program legally sanctioned for seven years and illegally conducted for five years before that — was very likely unconstitutional. Judge Richard Leon denounced the agency’s activities in collecting data on all Americans’ phone calls as “almost Orwellian.”

Two days later, the Obama administration released a comprehensive report that found “the current storage by the government of bulk metadata creates potential risks to public trust, personal privacy and civil liberty.” And last Friday, the latest release of classified documents from Edward Snowden revealed surveillance efforts that included the office of the Israeli prime minister and the heads of international companies and aid organizations.

If the N.S.A. had not already gotten the message, the 300-plus-page advisory report, by a panel of intelligence and legal experts selected by President Obama, surely drove it home. All three branches of the federal government are now on record as recognizing that the agency has repeatedly misused, if not plainly abused, its powers, and that it must be reined in. The report’s 46 wide-ranging recommendations include stopping the bulk collection and storage of phone data, reforming the structure and processes of the Foreign Intelligence Surveillance Court, installing a civil liberties advocate to argue against the government’s position in that court, and introducing stricter oversight of the agency’s actions across the board.

Most of these would be welcome reforms, and some of them Mr. Obama can put in place on his own. In fact, when he was a member of the Senate Mr. Obama supported many reforms that were similar or identical to the ones now on his desk. Yet as president, he has allowed the surveillance programs to continue and even grow.