One of the few remaining Democrats in the state Senate who previously allied herself with the GOP is facing a primary challenge on June 23.

Staten Islander Brandon Stradford, 56, a retired social worker with the Human Resources Administration, is taking on eight-term incumbent state Sen. Diane Savino, who represents the Democratic-leaning 23rd district covering neighborhoods on the north and east shores of Staten Island and southern Brooklyn.

Stradford told The Post he will make Savino’s prior membership with the now-dissolved Independent Democratic Conference — which shared power with the Republican majority — a major campaign issue.

“The IDC disenfranchised people who voted for her,” Stradford said.

“I can’t say that her tenure with the IDC helping Republicans has subsided as an issue. I’m going to bring that back to people’s remembrances. It hasn’t gone away.”

He also claimed that Savino has not steered enough resources to “communities of color.”

Stradford has his work cut out for him, however.

Savino quit the IDC and mended fences with Democrats by rejoining the regular Democratic conference in 2018. And her prior alliance has not been a liability with her constituents so far.

Of the eight IDC members who ran for re-election in 2018, six were defeated by Democratic insurgents. But Savino was one of the two survivors who breezed to victory.

Savino — author of the law that legalized marijuana for medicinal use — captured more than two-thirds of the vote in the 2018 Democratic primary. She defeated Jasmine Robinson, who was backed by the left-leaning Working Families Party and received 20 percent of the vote and Stradford, who collected 12 percent.

And she has the backing of Senate Majority Leader Andrea Stewart Cousins (D-Yonkers) and the Democratic caucus.

“Diane has done a great job. We look forward to getting her re-elected,” a spokesman for Stewart-Cousins said.

But Stradford argued that he entered the race two years ago as a latecomer and insists he had a better chance against Savino one-on-one.

“A lot of people wanted me to run again,” he said.

A lifelong resident of the district who was born and raised in West Brighton and now lives in St. George, Stradford has performed missionary work at an orphanage in Bangladesh through his church, the International Christian Center, and vowed to champion the needs of the poor.

One of his brothers is a police officer, while another has been incarcerated.

“I’m pro-police but pro-smart policing,” he said.

In response to the controversy surrounding the state’s new bail reform law — which eliminated cash bail for most misdemeanors and some non-violent felonies — Stradford said, “There is a need to revisit it, not eliminate it.”

In a statement, a Savino campaign spokesman said: “Senator Savino is proud of her record of accomplishment in the Senate, where she has written and chaptered over 100 bills. She has delivered for the people of her district and has been proud to be the standard bearer for working people across the state. She looks forward to continuing to fight for her constituents.”