GOP operatives are concocting a plan to have Democrat Melinda Katz run as a Republican in November to stop Alexandria Ocasio-Cortez’s soft-on-crime protégé from becoming the next Queens district attorney, sources told The Post.

Tiffany Cabán — whose radical ideas include wanting to close city jails and legalize prostitution — was leading and expected to prevail against Democratic machine-backed Katz in Tuesday’s still-too-close-to-call primary, which could be decided by some 4,000 absentee and affidavit ballots.

Now the GOP is scrambling to find a candidate who can stand up to the 31-year-old public defender — and is turning to centrist Democratic foe Katz, who trailed Cabán by just more than 1,000 votes Wednesday morning — as the party’s best hope to block the Cabán, a Republican insider said.

“I do think there’s a path. It is ­doable,” said City Councilman Eric Ulrich (R-Queens), a powerful force in the county’s Republican Party.

GOPers are also considering Greg Lasak, who sought the Democratic nomination but fell some 20,000 votes short of the 32,000-plus that Cabán and Katz both got.

“I do think there is a path there for him as well,” added Ulrich, who is term-limited and rumored to be eyeing the Queens borough presidency, which is now held by Katz.

The Queens GOP has successfully deployed this strategy before. Under the state’s Wilson-Pakula law, a party committee can vote to nominate someone enrolled in another party to run on its ballot line for public office.

In 2017, conservative Democrat Robert Holden lost his primary to Councilwoman Elizabeth Crowley. The Queens GOP then nominated Holden as its candidate in the general election — and he defeated Crowley.

The Republicans are apparently hurting for a DA candidate in the November general election after Queens attorney Daniel Kogan, the GOP nominee, told The Post Wednesday he may not even run.

“I don’t have much of . . . I don’t expect it will be much of a campaign on my behalf,” Kogan, 61, said Wednesday when reached by phone at his Ozone Park law office.

“I haven’t decided to make an active campaign yet. It was an honor to be nominated, but I ­haven’t started an active campaign.”

Kogan struggled to outline a policy platform and laughed when asked if he had one.

“Just to keep up the present administration and improve on it if I can,” he said referring to longtime Queens DA Richard Brown, who died in May.

While Kogan was circumspect about his prospects, his party leader initially claimed she was all in for him.

“I’m thinking that we have a ­really good Republican candidate, and we’re gonna give it our all,” said GOP county chair Joann Ariola. “We’re committed to running a full-fledged race.”

She was shocked to learn about Kogan’s reticence.

“That is actually news to me, but I will speak with Daniel later,” she said. “The county has every intention of making this a campaign.”

The GOP could get Kogan off the ballot by nominating him for a judgeship — which would allow the party to put a new candidate on the ballot even though the application deadline and primary have already passed, politics-watchers said.

Ariola and Kogan denied there are plans afoot to put Katz or ­Lasak on the party line.

But sources said overtures were made to Ariola on Wednesday about the possibility of nominating a Democrat in an effort to stop Cabán.

Ariola indicated the party would lean on disillusioned centrist Dems to keep Cabán, who has been endorsed by the Democratic Socialists of America, out of office.

“Socialism is a disease and it is incumbent upon us to do everything we can to push it back,” the GOP chair said. “I think mainstream Democrats are also seeing that a misguided lean to the left has caused the socialist movement to progress. It’s a case of ‘the enemy of my enemy is my friend.’ ”

Lasak declined to comment.

Katz’s camp did not deny the GOP’s rumored plans, but said in a statement that for now she is interested in counting remaining primary ballots — which could take until next Wednesday — in the hope she clinches the Dem nomination. “With thousands of ballots left to count, every voter deserves to be heard,” she said.

Katz’s chances of prevailing in the primary, however, are slim, according to an elections expert.

“It looks really close, but it’s a lot of votes to overcome, and it’s not as close as it looks,” election lawyer and former state Sen. Martin Connor told The Post of the 1,000-vote spread separating Cabán and Katz.

“When you’re talking about the absentees and affidavits — say there’s another 4,000 votes to be counted; they’re gonna be split among all the candidates — for Katz to catch up . . . she’d need to get 55 percent of those votes.”

Cabán’s apparent victory came a year after Ocasio-Cortez unseated Queens party boss and Rep. Joe Crowley in a 2018 primary upset.

Additional reporting by Nolan Hicks