Not long after her failed presidential run, Massachusetts Democratic Sen. Elizabeth Warren just got some more bad news.

The U.S. Supreme Court has ruled that the president has the legal authority to fire the director of the Consumer Financial Protection Bureau (CFPB) without cause.

The CFPB is a consumer watchdog agency claiming to better regulate mortgages, student loans, and other financial products.

The agency was proposed by Massachusetts Democratic Sen. Elizabeth Warren in 2007 and created in 2010 by President Barack Obama with Warren doing most of the heavy lifting.

In a 7-2 ruling, the Supreme Court also stopped just short of dismantling the agency in its entirety.

Justices John Roberts, Samuel Alito, Brett Kavanaugh, Clarence Thomas, and Neil Gorsuch sided with the Trump administration.

The court’s four liberal justices all dissented.

Writing for the majority, Chief Justice John Roberts wrote “the structure of the CFPB violates the separation of powers.”

“The agency may, therefore, continue to operate, but its director, in light of our decision, must be removable by the president at will,” Roberts wrote.

CBS News reported:

The court ruled along ideological lines that the structure of the CFPB violates the Constitution.

The high court also found by a vote of 7-2 that the provision of the law dictating the director’s removal can be struck down without invalidating the entirety of the Dodd-Frank Wall Street Reform and Consumer Protection Act, which established the consumer agency.

With its ruling, the high court handed a victory to conservatives on Capitol Hill who have long taken aim at the consumer watchdog agency, which was created in 2010 in the wake of the financial crisis.

Warren released a statement after the ruling trying to spin it as still being favorable, but it’s clear she was grasping for anything positive.

“Even after today’s ruling, the CFPB is still an independent agency. The director of that agency still works for the American people. Not Donald Trump. Not Congress. Not the banking industry. Nothing in the Supreme Court ruling changes that,” she said.

On the other side, Republicans praised the ruling and some said the Supreme Court ruling should open the door for reform.

Rob Nichols, the president of the American Bankers Association, argued that the bureau should be converted into a five-member, bipartisan commission.

“This important change would balance the bureau’s needs for independence and accountability while broadening perspectives on rule-making and enforcement,” Nichols said.

Nebraska GOP Sen. Ben Sasse, who is on the banking committee, expressed disappointment that the bureau would remain as an “unchecked fourth branch of government.”

“Today’s decision says that the head of the organization should be removable — which is great, but when I read the Constitution, it’s pretty clear that the C.F.P.B. shouldn’t exist to begin with,” Sasse said.