A federal judge early Saturday blockedย Elon Muskโ€™s Department of Government Efficiencyย from accessing Treasury Department records that contain sensitive personal data such as Social Security and bank account numbers for millions of Americans.

U.S. District Judge Paul Engelmayer issued the order after 19 Democratic attorneys general sued Presidentย Donald Trump.ย The case, filed in federal court in New York City, alleges the Trump administration allowed Muskโ€™s team access to the Treasury Departmentโ€™s central payment system in violation of federal law.

The payment system handles tax refunds, Social Security benefits, veteransโ€™ benefits and much more, sending out trillions of dollars every year while containing an expansive network of Americansโ€™ personal and financial data.

Muskโ€™s Department of Government Efficiency, also known as DOGE,ย was createdย to discover and eliminate what the Trump administration has deemed to be wasteful government spending.

THIS IS A BREAKING NEWS UPDATE. APโ€™s earlier story follows below.

Nineteen Democratic attorneys general sued Presidentย Donald Trumpย on Friday to stopย Elon Muskโ€™s Department of Government Efficiencyย from accessing Treasury Department records that contain sensitive personal data such as Social Security and bank account numbers for millions of Americans.

The case, filed in federal court in New York City, alleges the Trump administration allowed Muskโ€™s team access to the Treasury Departmentโ€™s central payment system in violation of federal law.

The payment system handles tax refunds, Social Security benefits, veteransโ€™ benefits and much more, sending out trillions of dollars every year while containing an expansive network of Americansโ€™ personal and financial data.

The White House did not immediately respond to a request for comment.

Muskโ€™s Department of Government Efficiency, also known as DOGE,ย was createdย to discover and eliminate what the Trump administration has deemed to be wasteful government spending. DOGEโ€™s access to Treasury records, as well as its inspection of various government agencies, has ignited widespread concern among critics over the increasing power of Musk, while supporters have cheered at the idea of reining in bloated government finances.

Musk has made fun of criticism of DOGE on his X social media platform while saying it is saving taxpayers millions of dollars.

New York Attorney General Letitia James, whose office filed the lawsuit, said DOGEโ€™s access to the Treasury Departmentโ€™s data raises security problems and the possibility for an illegal freeze in federal funds.

โ€œThis unelected group, led by the worldโ€™s richest man, is not authorized to have this information, and they explicitly sought this unauthorized access to illegally block payments that millions of Americans rely on, payments for health care, child care and other essential programs,โ€ James said in a video message released by her office.

James, a Democrat who has been one of Trumpโ€™s chief antagonists, said the president does not have the power to give away Americanโ€™s private information to anyone he chooses, and he cannot cut federal payments approved by Congress.

Also on the lawsuit are Arizona, California, Colorado, Connecticut, Delaware, Hawaii, Illinois, Maine, Maryland, Massachusetts, Minnesota, Nevada, New Jersey, North Carolina, Oregon, Rhode Island, Vermont, and Wisconsin.

The suit alleges that DOGEโ€™s access to the Treasury records could interfere with funding already appropriated by Congress, which would exceed the Treasury Departmentโ€™s statutory authority. The case also argues that the DOGE access violates federal administrative law and the U.S. Constitutionโ€™s separation of powers doctrine.

It also accuses Treasury Secretary Scott Bessent of changing the departmentโ€™s longstanding policy for protecting sensitive personally identifiable information and financial information to allow Muskโ€™s DOGE team access to its payment systems.

โ€œThis decision failed to account for legal obligations to protect such data and ignored the privacy expectations of federal fund recipients,โ€ including states, veterans, retirees, and taxpayers, the lawsuit says.

Connecticut Attorney General William Tongย said itโ€™s not clear what DOGE is doing with the information in the Treasury systems.

โ€œThis is the largest data breach in American history,โ€ Tong said in a statement. โ€œDOGE is an unlawfully constituted band of renegade tech bros combing through confidential records, sensitive data and critical payment systems. What could go wrong?โ€

The Treasury Department has said the review is about assessing the integrity of the system and that no changes are being made. According to two people familiar with the process, Muskโ€™s team began its inquiryย looking for waysย to suspend payments made by the U.S. Agency for International Development, which Trump and Musk are attempting to dismantle. The two people spoke with The Associated Press on condition of anonymity for fear of retaliation.

Separately, Democratic lawmakers areย seeking a Treasury Department investigationย of DOGEโ€™s access to the governmentโ€™s payment system.

Also, labor unions and advocacy groups have sued to block the payments system review over concerns about its legality. A judge in Washington on Thursday temporarily restricted access to two employees with โ€œread onlyโ€ privileges.