“I told you we can’t trust him!” a furious Chirlane McCray railed at her husband, Mayor de Blasio, after learning that Police Commissioner Bill Bratton had stood up to Banks during a power struggle Friday that ended with the chief’s resignation, sources told The Post.

By “him” McCray meant Bratton, whom she never wanted to see at the commissioner’s desk.

“She is friendly with Banks, and he was her choice” for commissioner, a source said.

“She was very upset when he resigned,” the source said of ­McCray, who has sat in on NYPD CompStat meetings, and whom de Blasio has called his most trusted adviser.

By Friday afternoon, de Blasio had summoned Bratton to City Hall, blasting him face to face for not catering to Banks, who had resigned rather than take a promotion to No. 2 at the NYPD — a position Banks felt was powerless.

It was unclear where McCray was when her husband called Bratton on the carpet.

“Banks was used to getting his way,” another source said Saturday, noting that the previous commissioner, Ray Kelly, had “never said no to Banks.”

“Then Bratton comes on the scene, and Banks makes a power move. He wants more power, and he has the backing of City Hall and the Rev. Al [Sharpton]” to embolden him, the source said.

Chief of Department Philip Banks lllDavid McGlynn

“All of a sudden, Banks is not getting what he wants.”

Banks told Bratton on Friday that he would take the No. 2 position of first deputy commissioner only if he could control the Internal Affairs Bureau and if his successor as chief of department reported directly to him.

Banks apparently foresaw his power play’s outcome and had warned his closest aides earlier in the week that he expected to be stepping down.

Quitting could either be the best or worst move of Banks’ career, sources said.

He has long coveted the job of commissioner, and should he now try to stage a coup from outside One Police Plaza, he faces a weakened Bratton and has the widespread support of minority politicians and law-enforcement groups.

“If Bratton left and [Banks] was offered the commissioner job, why wouldn’t he take it?” another source said. “That’s the job he wanted in the first place.”

Mayor de BlasioChad Rachman

Banks was “the perfect choice,” for commissioner, City Councilman Andy King (D-Bronx), co-chair of the Black, Latino and Asian Caucus, said Saturday.

Banks’ departure also has de Blasio — not to mention ­McCray — angry.

Sharpton, too, has been a cheerleader, saying Saturday that Banks earned his respect after years of working together, even while Sharpton insists, “I do not make recommendations” on police personnel matters, only policy.

“No comment,” Banks told a Post reporter who asked about his resignation, or what he’d do if offered the commissioner job.

Some NYPD insiders said Banks is no longer heir apparent.

“He’s damaged goods,” one said. “A big crybaby who embarrasses the boss when he doesn’t get what he wants.”

Bratton too, is now “wounded,” said another source — despite the city’s low crime rates. In particular, homicide rates are on track for numbering under 300 for 2014, even with a stronger CCRB and the hamstringing of stop and frisk.

“Nobody knows better than Bratton what happens once your boss gets mad at you,” another source said, referring to Bratton’s firing in the 1990s by then-Mayor Rudy Giuliani.

Said another source of Bratton, “He’s between a rock and a hard place, with de Blasio putting Sharpton right up there with him and giving him equal standing.