A federal three-judge panel ruled the structure of the Consumer Financial Protection Bureau is unconstitutional, but said the agency could continue to operate.

The agency’s structure gives too much power to its director, the panel said Wednesday. He or she can only be removed “for cause,” such as neglect of duty. That conflicts with the Constitution, the court said, which allows the president to remove executives for any reason.

"This split decision – which bizarrely relies on a mischaracterization of my original proposal for a new consumer agency – will likely be appealed and overturned, “ said U.S. Senator Elizabeth Warren, D-Mass.

But even if it stands, the ruling makes a small, technical tweak to Dodd-Frank and doesn’t question the legality of any other past, present, or future actions of the bureau, Warren said.

“The CFPB has been, and will remain, highly accountable to both Congress and the president, and continued Republican efforts to transform the agency's structure or funding should be seen for what they are: attempts fostered by big banks to cripple an agency that has already forced them to return over $11 billion to customers who have been cheated," she said.

The court case involves charges that the mortgage lender PHH Corp. was involved in a scheme to refer customers to selected mortgage insurance companies in exchange for illegal kickbacks. PHH was fined $109 million by the bureau for the illegal payments it had received.

The court sent the case back to the bureau for revisions.

The panel, the U.S. Court of Appeals for the District of Columbia Circuit, which made the decision, is made up of three judges appointed by Republican presidents.

Republicans are critical of the bureau because it takes action against banks and other big corporations, levies huge fines, and recovers millions of dollars on behalf of consumers. The bureau was created after the Great Recession to provide a single federal agency to protect consumers in their financial transactions.

Rep. Jeb Hensarling, R-Texas, chairman of the House Financial Services Committee, has introduced legislation to replace the bureau’s director with a five-member commission.

“By design, the CFPB remains arguably the least accountable Washington bureaucracy in the history of America and it shows,” Hensarling said. “This must change.”