Two people sit behind a police car as Miami police officers investigate a murder on Thursday in Miami. Derek Medina, who authorities say fatally shot his wife — and apparently then posted a photo of her body on Facebook — turned himself in to police on Thursday. (ASSOCIATED PRESS / J Pat Carter)

SOUTH MIAMI, Fla. (AP) — A South Florida man who authorities say fatally shot his wife — and apparently then posted a photo of her body on Facebook — has been charged with first-degree murder.

Police said in an arrest affidavit Thursday that 31-year-old Derek Medina says he shot 26-year-old Jennifer Alfonso several times at their South Miami home after she punched him repeatedly and wielded a knife He tells police that he had armed himself with a gun during a verbal dispute when she said she was “leaving him.”

When officers responded to the home, they found Alfonso’s body, as well as her 10-year-old daughter, who was unharmed.

A post on a Facebook page identified as Medina’s says, “I’m going to prison or death sentence for killing my wife.” The photo was up for more than five hours before it was removed by Facebook.

THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP’s earlier story is below.

A South Florida man who authorities say fatally shot his wife — and apparently then posted a photo of her body on Facebook — turned himself into police Thursday.

Derek Medina, 31, told officers he had shot Jennifer Alfonso, 26, at their South Miami home, Miami-Dade police reported in a news release. When officers responded to the home, they found Alfonso’s body, as well as her 10-year-old daughter, who was unharmed.

A post on a Facebook page identified as Medina’s said at 11:11 .a.m. Thursday, “Im going to prison or death sentence for killing my wife love you guys miss you guys takecare Facebook people you will see me in the news.”

The post claimed that his wife was punching him and that he wasn’t going to stand any more abuse. However, YouTube videos linked to his Facebook page earlier this week show him working out in a martial arts studio, punching and kicking a heavy bag.

The next and final post — also at 11:11 a.m. and titled “Rip Jennifer Alfonso” — was a gruesome photograph showing a woman in black leotards slumped on the floor, on her back with her legs bent backward and blood on her left arm and left cheek. The photo was up for more than five hours before Facebook removed the page late Thursday afternoon.

A Facebook spokeswoman said in an email to The Associated Press that she couldn’t comment on a law enforcement investigation but could provide a general comment from the company.

“The content was reported to us,” the spokeswoman wrote. “We took action on the profile — removing the content and disabling the profile, and we reached out to law enforcement. We take action on all content that violates our terms, which are clearly laid out on our site.”

Public records show that Medina and Alfonso first married in January 2010, divorced in February 2012 and then remarried three months later. Medina bought the condominium unit where the couple lived in March 2012 for $107,000.

On his Facebook page, Medina claimed to be a supervisor at a property management company and to have appeared in the Miami-based crime drama “Burn Notice,” though his name doesn’t appear in online credits for the show.

Photos posted by Medina on Wednesday show the family enjoying a meal alongside an unnamed marina and lounging beside a swimming pool.

Police had the area around the condo complex where the couple lived, in a suburb south of downtown Miami, taped off Thursday evening. The complex is made up of yellow-peach colored townhouses with faded wood roofs.

Several cars filled the near-empty parking area in front of the townhouses as police questioned neighbors and possibly friends of the victim. Some of those gathered were crying.

Neighbor Phil Eby said he didn’t know the couple very well but expressed surprise at the shooting.

“I met him a couple of times. He seemed like a pretty nice guy,” Eby said. “But I don’t remember her at all.”