MIAMI – Derek Medina, the South Miami man accused of murdering his wife and posting a confession and photo of her body on Facebook, will be held in jail without bond, a judge ruled Friday afternoon.

The decision was not unexpected — in Florida, a charge of first-degree murder does not allow for an initial bond.

Medina appeared via closed-circuit television from jail. He is being held on the ninth-floor psychiatric ward of Miami-Dade County Jail and wore a padded gown for inmates on suicide watch.

Two corrections officers flanked Medina as he told an assistant public defender: “I’m in the process of talking to someone,” he said, apparently a reference to hiring a lawyer, although he could not clarify to the judge.

For now, the public defender’s office will represent Medina, who will be set for an arraignment in 21 days.

No relatives appeared in court on his behalf.

For a charge of first-degree murder, Miami-Dade prosecutors must take his case to a grand jury.

Medina’s life was open to the world.

On YouTube, the 31-year-old South Miami man posted scores of videos of himself enjoying sports.

He authored six online books, with long-winded titles about spirituality, saving the world and hunting ghosts. Medina snapped photos of his arm tattoos, meals, boating trips and drinks poolside with his wife.

But on Thursday, Medina shocked the online world by making one last announcement on Facebook: that he had shot and killed his wife before posting a photo of her twisted, bloodied body lying on a linoleum floor.

“I’m going to prison or death sentence for killing my wife. Love you guys. Miss you guys. Take care. Facebook people you’ll see me in the news,” Medina wrote in a Facebook post that remained public for hours Thursday evening before the site removed his profile page at the request of police.

Even in a world accustomed to intimate details of people’s lives plastered on social media, Medina’s posts — which went viral — were shocking.

Medina walked into the South Miami police station around noon Thursday, then spent the evening speaking with homicide detectives about what led up to the shooting death of his wife, Jennifer Alfonso, 26.

Investigators, armed with a search warrant, began documenting the crime scene inside the couple’s townhouse on 67th Avenue, then charged Medina with first-degree murder late Thursday.

SELF-DEFENSE MAY BE CLAIMED

Alfonso’s 10-year-old daughter from a previous relationship was upstairs at the time of the killing, but was unharmed. Officers quickly escorted her out of the home, with a blanket wrapped around her, after finding Alfonso’s body.

Medina is likely to claim self-defense.

His father, Derek Medina Sr., told reporters his son killed Alfonso only after she brandished a knife. In the younger Medina’s Facebook post, he did not mention a knife, but wrote: “My wife was punching me and I’m not going to stand anymore with the abuse so I did what I did. Hope u understand me.”

But according to an arrest report, Medina admitted to investigators he got into an argument with Alfonso. The report said he went upstairs, fished his pistol from a closet and pointed it at Alfonso.

Alfonso yelled she was “leaving him,” according to the report by Detective Jonathan Grossman. Then, Medina — still brandishing the weapon — followed her downstairs to the kitchen, where she grabbed a knife.

Medina said he disarmed Alfonso, put the knife in the drawer, then shot her several times after she began punching and kicking him, the report said.

The photo Medina posted on Facebook shows Alfonso, wearing all black and pink socks, on her knees, twisted backward in a bloody heap.

Alfonso’s former boss at a West Miami-Dade Denny’s told The Miami Herald that the husband was extremely jealous and had hit Alfonso in the past.

“She would be bruised up,” said Amada Cooper, who described Medina as a controlling husband who tried to force her to quit her job as a server because he didn’t want her working nights.

A VIOLENT MARRIAGE

After several violent episodes, another co-worker implored Alfonso to leave him. “He would always come back, begging her come back,” said Cathy LeBella. “She would say he was going to change. She was in love with him.”

Medina and Alfonso initially married in early 2010 after dating only a few months. The marriage was stormy and friends said he would often kick her out. The two always got back together, however.

They divorced in early 2012, then remarried a few months later, records show. Cooper said the two fought often because Medina, most recently a property manager at a posh Coral Gables condo building, could not hold a job for more than a few months.

“He wouldn’t even let her talk on the phone,” Cooper said. “He always waited for her outside. One time, he went storming in, looking for her, telling her to get outside.”

Another friend, who did not want his name used, said Medina once threatened to kill him and another pal on Facebook after deciding they “weren’t real friends.”

He also recalled that Medina, during one of his breakups with Alfonso, had angrily blasted the young woman on his Facebook page.

At Denny’s, where she worked as a server, Alfonso was known as a dependable worker with a loyal customer base, who worked the graveyard shift to care for her daughter.

“She was a beautiful person,” LaBella said. “Her daughter was her pride and joy.”

On his public Facebook account, Medina had 164 friends. His post on Alfonso’s killing was shared by more than 100 people on the networking site before Facebook shut down the account.

A Facebook spokesman said the website does not comment on law enforcement investigations.

“The content was removed via our own processes,” the spokesman said. “The content was reported to us, and then 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.”