NYPD union leaders think the rift between the rank and file and Mayor Bill de Blasio is so bad, it can only be healed by one man — ex-President Bill Clinton — and police brass are receptive to the idea, sources told The Post.

The startling proposal, made during a meeting between Police Commissioner Bill Bratton and the NYPD’s five union chiefs on Wednesday, came as a shot cop got a hero’s send-off upon being released from the hospital.

The Clinton solution was floated by detectives union head Michael Palladino.

“Palladino said the mayor needs someone like Bill Clinton to act as an intermediary,” one source said.

A source said Clinton was an ideal choice because “he’s a statesman; he’s well-respected; he’s a good mediator and he was a pro-law enforcement president.”

A spokesman for the nation’s 42nd president didn’t immediately return a request for comment.

De Blasio’s poor relationship with the rank and file led to open disrespect following a double cop-killing on Dec. 20, with thousands of cops turning their backs as he delivered eulogies at the funerals of Rafael Ramos and Wenjian Liu.

Two more cops were shot Monday night, and both survived.

On Wednesday, wounded Officer Aliro Pellerano waved from a wheelchair and shook hands with wellwishers upon his release from St. Barnabas Hospital in The Bronx.