Left: Wilson Smith (Eighth Judicial Circuit Solicitor's Office). Right: Ahkeyra Raysor (Low Country Mortuary).

A man who tried to trick cops into thinking he shot a woman in self-defense when he actually killed her in cold blood is headed to prison for decades, according to South Carolina authorities.

Wilson Justice Xavier Smith, 27, of North Carolina, was found guilty by a Greenwood County jury late Thursday of murder and possession of a weapon in the death of 22-year-old Ahkeyra Raysor, the Eighth Judicial Circuit Solicitor's Office said in a press release. He was sentenced to 40 years behind bars.

Cops responded in December 2022 to the Burfield Apartments on Cambridge Avenue East in Greenwood after Smith called 911 to say he had shot a woman in self-defense.

"When officers arrived on scene they found Raysor lying on a bed with an apparent gunshot wound to her head and a shotgun lying conspicuously across her body," prosecutors wrote.

Paramedics rushed her to the hospital, where doctors pronounced her dead.

Smith told detectives Raysor fired the shotgun at him first and he shot in self-defense. But officers "immediately suspected" something was fishy about his claims. Cops found the DNA of Smith and others on the shotgun — but not Raysor's. Other witnesses refuted Smith's claims, prosecutors stated.

More from Law&Crime: Estranged husband arrested months after wife found dead down 75-foot embankment initially believed to be from accidental fall, cops say

The press release did not detail the relationship between Smith and Raysor, nor did it divulge a potential motive for the murder. Jurors deliberated for about 10 hours before convicting Smith after a two-week trial.

"This was a calculated and violent act, followed by a deliberate attempt to deceive law enforcement and escape responsibility," Solicitor David M. Stumbo said in a statement. "Because of a total team effort — from investigators and prosecutors to victim advocates and administrative staff — the truth prevailed, and a violent killer has been held accountable."

Raysor left behind two children and had enrolled in hairdressing school before her death, according to her obituary.

"She had a profound love for cooking for others. She was a free-spirited individual and loved family time," the obituary said.