Opponents of Richard Cordray, the director of the Consumer Finance Protection Bureau (CFPB), are building a legal case they hope will lead the administration of President Donald Trump to fire the controversial head of the bureau.

Created by the landmark Dodd-Frank Act, the CFPB's enforcement of consumer-protection laws has resulted in recent years in $11.7 billion being paid to consumers by banks, credit card companies, and mortgage companies. The behind-the-scenes effort by those who oppose the bureau's aggressive enforcement aims to show Cordray is guilty of “inefficiency, neglect of duty, or malfeasance”—the only conditions under the law sufficient to oust the director.

Cordray’s supporters welcome a fight because the agency is popular with the public, including those who voted for Trump, and believe an attempt to remove Cordray would politically damage Trump and his fellow Republicans.

Trump can choose to keep Cordray or fire him for cause and the President's advisers are divided on what he should do.

“If he were to try to remove him now, there’s no question that Cordray will fight back in court,” said Alan Kaplinsky, the head of Ballard Spahr’s consumer finance group and a critic of the agency. “The risk Trump runs is a battle royal with the Democrats and the possibility of losing that battle.”

Mr. Kaplinsky is not involved in the effort to build a case against Cordray.

“As long as Cordray doesn’t file a lawsuit that’s really off the rails, isn’t pushing his jurisdiction beyond where it can be pushed or coming up with some extreme theory, maybe he can be tolerated,” Kaplinsky said. “What’s the rush?”