A Florida man has been charged with murdering a 24-year-old who posted disparaging comments about his ex-girlfriend online, police said.

Juan Jose Esparza, who refers to himself on Facebook as a “Leader at Gangster City,” tried to convince detectives that the victim, Joel Diaz Sanchez, committed suicide on Friday inside his Sarasota home after they “cleared the air” about the comments, according to an arrest report obtained by the Miami Herald.

Esparza claimed he put a 9mm handgun on a table as they sat down for a beer — and that Sanchez suddenly picked the weapon up and shot himself in the head, according to the report.

Esparza said he then panicked and went to his home in Bradenton, police said.

A day later, Sanchez’s body was found on the floor in the living room of his home after cops got a report of a possible suicide. But evidence at the scene revealed that he did not take his own life, police said Tuesday in a news release.

Esparza’s ex said she broke up with him just before he went to visit Sanchez, further angering him after an argument on Facebook between the two men. The woman gave cops a video that showed Esparza at Sanchez’s home on Friday, calling for him “in an antagonizing matter,” according to the report.

Esparza’s roommate, meanwhile, told detectives that he overheard an argument between Esparza and Sanchez, implying that he had a gun and was “going to handle things,” police said.

Esparza, who is also facing armed robbery, weapons and tampering charges, remained held without bail Wednesday, jail records show.