Federal appeals judges are divided as they hear arguments over whether the president should be able to more easily fire the head of the government's consumer finance watchdog agency.

The U.S. Court of Appeals for the District of Columbia, in a rare hearing Wednesday by all its judges, took up the politically charged case involving the Consumer Financial Protection Bureau and the power of its director. The judges are reconsidering a ruling last fall by a divided three-judge panel that would make it easier for President Donald Trump to fire CFPB Director Richard Cordray. He was appointed in 2011 by President Barack Obama.

Lawyers for the Trump administration and a company sanctioned by the consumer agency argued that the way the CFPB was created, by Obama and Democrats in Congress after the financial crisis, violated the Constitution, by giving the director excessive power.

The 10 judges — six appointed by Democratic presidents and four by Republicans — appeared split along ideological fault lines as they challenged, in turn, the opposing arguments put forward by the Trump administration and the CFPB.

In an unusual turn, the Trump Justice Department is opposing the consumer watchdog agency within its own government.

"This agency goes further than anything Congress has attempted to do in history," declared Ted Olson, the prominent attorney with Supreme Court victories who represents the mortgage lender in this case, PHH Corp. The company was accused of illegal conduct by the CFPB and ordered to pay $109 million, then struck back by bringing the case that has raised constitutional issues and moved up to the nation's second most influential court.

The appeals panel ruled in October that the way the CFPB is organized violates the Constitution's separation of powers by limiting the president's ability to remove the director. The law creating the CFPB allows its director to be removed only "for cause" — such as neglect of duty — and not over political differences. The judges said that conflicts with the Constitution, which allows the president to remove officials for any reason.

Olson criticized the "power concentrated in one individual" — Cordray — when the CFPB was established by the 2010 Dodd-Frank financial oversight law.

Several judges quickly jumped in and challenged Olson's assertions.

Having a consumer agency board with several members could actually make them less accountable than a single director, suggested Patricia Millett, one of four judges who were named by Obama. And although the CFPB receives guaranteed funding from the Federal Reserve and thereby avoids congressional budget approval, the agency still must justify its expenditures and activities to Congress, Millett said.

Justice Department attorney Hashim Mooppan called the CFPB "a quintessentially executive agency" whose director can't be distinguished in the power he wields from the Treasury secretary or other members of the president's Cabinet.

On the other side, attorney Lawrence DeMille-Wagman, representing the CFPB, made the case that the consumer agency works in a similar way to the Federal Trade Commission. The courts have upheld the firing-only-for-cause protection for FTC commissioners, he noted.

But Judge Brett Kavanaugh wryly suggested a turnaround scenario: If Trump appointed a new CFPB director after Cordray's term expired, and that person enjoyed similar protection through a five-year term, there may be a president from another party in 2023 wanting to fire him or her.

"Whose ox is going to get gored? That's going to shift," said Kavanaugh, one of three judges appointed by George W. Bush.

In the FTC case, the Supreme Court allowed a similar "for-cause" restriction on the president's power to fire a regulator. As a result, some of the judges at Wednesday's session appeared to suggest that only the high court, not they, can rule on whether the CFPB is unconstitutional.

Cordray's five-year term doesn't end until July 2018, and he's shown no intention of leaving. His supporters say no head of a federal agency has been fired "for cause" in modern times. Some Republican lawmakers have publicly urged Trump to fire him.

Cordray, a Democrat and former Ohio attorney general, is the first and only director of the young consumer agency. The CFPB has been swept up in partisan politics since its creation in 2010 by the Dodd-Frank legislation that tightened supervision of Wall Street and the financial industry following the crisis and the Great Recession. Wall Street interests, the banking and consumer finance industries and Republicans in Congress have fiercely opposed and criticized the agency, accusing it of overreaching in its regulation.

Democrats and consumer groups defending the CFPB point to its record. The agency, with about 1,600 employees, has taken legal action against banks, mortgage companies, credit card issuers, payday lenders, debt collectors and others. The CFPB says that over five years it has recovered $11.7 billion that it returned to more than 27 million harmed consumers. It has handled over a million complaints from consumers.

The case before the appeals court involves allegations that PHH was involved in a scheme to refer customers to certain mortgage insurance companies in exchange for illegal kickbacks. The CFPB ordered the company to repay $109 million in illegal payments it had received. PHH claimed its conduct was legal and challenged the agency's structure as unconstitutional.