A Colorado man accused of murdering his wife will be allowed to pay for his pricey private defense attorney — using money he got from her life insurance policy, the state’s Supreme Court has ruled.

In the baffling case, Robert Feldman — who allegedly strangled his wife, Stacy, in the shower in 2015 — scored roughly $751,000 in insurance dough after her death, according to Denver’s FOX 31.

When Feldman, 55, was charged with her murder three years later, he plunked down at least $550,000 of that cash to pay for his lawyer, David Kaplan, according to the station.

But Stacy’s relatives then sued him in Probate Court, citing Colorado’s “Slayer Statute,” which is meant to stop killers from cashing in on their crimes. The life insurance money, they said, should instead go to Stacy’s children, the station reported.

They won the case, forcing Feldman to use a public defender.

But he appealed the decision in Colorado Supreme Court, which last month ruled that Stacy’s family acted too late to stop Feldman from using the funds.

The Supreme Court also found that the Probate Court can’t freeze money already given to a third party, in this case Feldman’s attorney’s law firm.

The ruling stunned lawmakers, who said it defies logic.

“On its face, it sounds completely ridiculous,” said Colorado state Rep. Jonathan Singer of Longmont.

“We need to go back to the legislature next year and revisit this and reopen those books and look at the real intent of [the Slayer Statute],” Singer said.

Feldman has since rehired Kaplan, the station reported.

Prosecutors say Feldman strangled Stacy in the shower, then staged a slip-and-fall, hours after she confronted him about having an affair. His trial is set for next year.