Updated

A Florida man was sentenced to life in prison Friday for fatally shooting his wife eight times during an argument, a slaying that gained international notoriety after he posted a photo of her bloody body on Facebook.

Miami-Dade Circuit Judge Yvonne Colodny imposed the maximum possible sentence on Derek Medina, 33, for the August 2013 killing of 27-year-old Jennifer Alfonso in their South Miami home. According to trial testimony, Medina told police he shot his wife during an altercation in which she threatened him with a knife -- but jurors didn't buy his self-defense claim.

In a recorded statement to police, Medina admitted to taking a cellphone photo of his dead wife's body and uploading it on Facebook. He wrote in a posting that said he expected to go to prison but was forced to kill Alfonso following years of physical abuse.

Colodny told Medina that in the posting "you foretold your future. You wrote on Facebook that `I am going to prison.' And that is where you will be going."

Medina must serve a minimum of 25 years before he is eligible for parole.

Prosecution evidence showed that Medina had vowed to kill Alfonso if she tried to leave him, which she told friends she planned to do. Prosecutors said that at 6 feet and about 200 pounds, Medina could have easily overpowered his 5-foot-6 wife without shooting her.

Assistant State Attorney Scott Dunn said evidence showed that Alfonso tried to defend herself but was "cornered like an animal" in their small kitchen by Medina. Adding to the brutality of the crime, he said, was the callousness Medina showed in posting the Facebook photo.

"It wasn't enough that he had to take an innocent person's life. He had to make a spectacle out of it," Dunn said.

Several Alfonso family members urged the judge to impose the maximum prison sentence.

"She wasn't just a body on the floor to be discovered. She was a wonderful, amazing person. She had so much to give, and now that's gone," said the victim's mother, Carolyn Knox.

Medina spoke briefly, in a rambling statement that in part urged President Barack Obama to fight corruption. He also vowed to fight his conviction through appeals.

"I didn't get a fair trial," he told the judge. "God knows the truth, and nothing further."

Trial testimony showed that the couple began fighting in their upstairs bedroom because Medina had failed to wake up his wife early that morning to watch a movie, as he had promised. Investigators testified that Alfonso threw mascara containers and towels at Medina, who pointed a gun at her in the bedroom but did not fire.

Later, the altercation continued in the downstairs kitchen, with some of it captured on one of the home's interior surveillance cameras. Medina told police Alfonso pulled a large kitchen knife on him and that he was able to disarm her, then went back upstairs for the gun and shot his wife when she kept fighting with her fists.

A medical examiner, however, testified that the eight shots were all fired downward toward Alfonso and that the position of her body on the kitchen floor indicated she had been cowering on her knees when killed.

Medina also was convicted of illegally firing a weapon inside a dwelling and with child neglect because Alfonso's 10-year-old daughter was in the home at the time. The girl was in an upstairs bedroom and did not witness the slaying or find her mother's body. But she was left alone for several hours while Medina went to turn himself in to police.

Colodny sentenced Medina to 15 years for the weapon conviction and five years for neglect