An Oceanside man who thought he was responding to a Craigslist ad for sex with a woman stabbed another man in his Mission Viejo apartment after discovering that the man had been masquerading as a woman online, a prosecutor said Wednesday.

Trial began on Wednesday for Adam Anthony Ingala-Whiting, 25, who is accused of killing 47-year-old Francesco “Joey” Bonomolo in his apartment in April 2014.

The prosecution alleges that Ingala-Whiting killed Bonomolo after he was deceived in a Craigslist sex ad. The defense maintains that Ingala-Whiting killed Bonomolo in self-defense after Bonomolo tried to rape him.

In his opening statement, Deputy District Attorney Troy Pino said Bonomolo was a gay man who sometimes dressed as a woman and would frequently post ads for sex on Craigslist under his female alter ego named “Jeanie.”

In 2014, “Jeanie” posted an ad on Craigslist looking for a man to join her in a threesome with her boyfriend. Ingala-Whiting responded, unaware that Jeanie and the boyfriend were actually just one man – Bonomolo, Pino said.

In corresponding with Jeanie, Ingala-Whiting indicated that had never been with a man before but was interested in experimenting with the couple, Pino said.

When he arrived at the Mission Viejo apartment, he was greeted by Bonomolo dressed in women’s clothing, he said.

The prosecutor said Ingala-Whiting suffered a cut to his hand as he stabbed Bonomolo more than 14 times.

Detectives found Ingala-Whiting’s blood on a doorknob and on Bonomolo’s computer as he tried to erase evidence of their online conversations, Pino said.

Authorities also tied him to the crime scene through cell phone records and obtained video of him visiting urgent care for the cut on his hand, he added.

Indicating possible premeditation, Pino said Ingala-Whiting expressed suspicion that he was being duped in prior conversations with Jeanie and on his cell phone had a diagram showing the anatomy of the neck.

Bonomolo, he said, was stabbed in the neck multiple times.

Ingala-Whiting’s defense lawyer, Peter Morreale, said Bonomolo was extremely active on Craigslist and would “bait younger men” to come to his home believing they were meeting Jeanie.

“Jeanie is not an alter ego,” he said. “Jeanie doesn’t exist.”

He said Ingala-Whiting went to the apartment expecting to meet a couple and then fought off Bonomolo with a pocket knife after he attacked him and tried to rape him.

Ingala-Whiting is expected to testify about his ordeal and will explain why he panicked and ran and later lied to police, his lawyer said.

The trial continues Thursday in Orange County Superior Court.