Mayor Bill de Blasio faces a showdown with organized labor if he pursues his idea to allow recruiting from outside union ranks for uniformed management positions in the city's jail system.

Key members of the City Council and jail guard unions say they would fight the mayor, generally regarded as a friend of labor, if he seeks to rewrite civil service laws that now require any promotion to uniformed upper management must come from within the existing ranks.

"I will do whatever is necessary to defeat it," said Norman Seabrook, the powerful president of the Correction Officers' Benevolent Association, the union representing about 9,000 of the rank and file.

Seabrook has publicly resisted a range of proposed changes to the scandal-scarred jails, which are the target of a lawsuit threat by the U.S. Justice Department over mistreatment of juvenile inmates. Seabrook, the union's leader since 1995, said he's beaten back ideas of past mayors and would do the same to de Blasio's.

"I've seen them come and go," he said of de Blasio's predecessors.

Depending how the mayor seeks to change the law, he would need approval from the City Council, the state Legislature, or both.

"That's what we have our lobbyists for," said Patrick Ferraiuolo, president of the 900-member Correction Captains' Association.

The path to promotion is a cornerstone of the city's civil service system, which governs how most of its 350,000-strong workforce is hired and all uniformed ranks are filled. New York in 1883 was the first U.S. city to adopt civil service laws. Anyone in the top uniformed position -- now called chief of department in the fire, police and correction departments -- must have started as an entry-level officer.

The mayor's suggestion came amid a searing report by federal prosecutors about jail brutality and a torrent of allegations of misconduct. Among the revelations was that top officials who allowed a statistics-fudging scandal on their watch were promoted, despite investigators' recommendations they be demoted. One rose to be the Correction Department's most senior uniformed officer, before abruptly retiring weeks after his history became public. Aides to the mayor privately lamented that the law essentially creates a short bench of candidates for top uniformed posts.

De Blasio's plan to change that has alarmed other uniformed unions.

An official with a city law enforcement union promised to go to war to stop it -- even if a proposal is just limited to jails.

"It's the beginning of the decay of the civil service system as we know it," speaking on condition of anonymity. "It'll be universally opposed."

De Blasio first said in September, soon after the promotions controversy, that he wanted to modify civil service law.

"We're handcuffed by some laws, in terms of how we choose personnel. And we are going to work to change those laws," the mayor said then. "We have to have the flexibility to bring in people who can help us really fix something profoundly broken."

His correction commissioner, Joseph Ponte, has reorganized the top levels of the department, eliminating some uniformed posts, bringing in new civilian oversight, replacing most of the brass and flattening the agency's organization chart so the uniformed wardens are more tightly supervised.

"He's figured out in what's a -- bluntly, a fairly constricted environment, in terms of the rules, a way to elevate real reformers and effective people," de Blasio said, adding, "there's still some bigger actions that we have to consider to help that now and in the future."

The mayor has not yet unveiled a proposal. But even his expressed wish to bring in bosses from outside infuriates the union leaders.

"It's disrespectful," Ferraiuolo said. "It's saying that the men and women are not capable and don't have the knowledge to run the department."

I. Daneek Miller (D-Queens), who chairs he council's Civil Service Committee, said changes are unnecessary.

"To bring in folks from the outside is a knee-jerk reaction," said Miller, himself a former leader of a bus and mechanics union. "I'm sure that within the department there remain qualified people."

Councilwoman Elizabeth Crowley (D-Queens), who criticized the controversial Correction promotions, nevertheless called de Blasio's idea "dangerous for our city workers" and one that "makes no sense" because those who rise from the ranks know the system well.

"We have civil service laws to protect the workers and to not let silly ideas such as this come about," said Crowley, who oversees Correction as chairwoman of the Fire and Criminal Justice Services Committee. "It's a bad idea. "