Barry Kin Lui remembers grabbing a knife while angry at his girlfriend, Lan Mu Do. He remembers finding himself sitting on her body with the knife in his hand.

But the actual killing — in the early morning hours of Aug. 17, 2011, in Beltsville — he does not recall, Lui said. By his account, he blacked out and didn’t know he was stabbing Do, whom he had envisioned as a devil or “a Dracula.”

On April 5, the 63-year-old man pleaded guilty to second-degree murder in Do’s killing. But he and his attorneys contend that he should now be found not criminally responsible, Maryland’s version of what is commonly known as an insanity defense.

A Prince George’s County jury heard testimony this week and will decide whether he should be confined to a mental institution or a prison.

“If a person was not of the right mind,” defense attorney David Martella said in court, “they should not be held criminally responsible.”

Lui contends that he suffered a mental breakdown after Do, 50, blackmailed him into signing over the deed to his Gaithersburg house less than a year into their relationship. Lui told the jury Tuesday that Do had threatened to tell authorities that he had entered into a fake marriage with a woman who needed a green card in exchange for $35,000.

County prosecutors, however, said Lui didn’t appear to be emerging from a blackout when Do’s son, responding to his mother’s screams, rushed to a bedroom and found Lui sitting on her.

“Lui said, ‘Call 911. I have killed your mother,’ ” Assistant State’s Attorney Christina Ropella told the jury. “The defendant didn’t say, ‘Oh my, God! What happened?’ ”

Lui testified that when he first met Do in November 2010, the relationship was good and that he moved into her Beltsville home. But after about six months, he signed over the deed to his house, and she “totally changed,” Lui said. He said that she forced him to cook and clean and took his paychecks and that he complied because of the blackmail threats.

“She is the queen,” Lui said through a Cantonese interpreter. “She makes all of the decisions. I can’t do anything. I can’t saying anything.”

Eventually, Lui said, Do told him to move out.

The night Lui stabbed Do, they had been arguing, according to accounts from police and neighbors. Lui was sleeping on the floor in a storage room, he testified, and Do was entering the room and turning on the lights about every half-hour to argue with him. The lack of sleep and the stress from losing his home and from the constant arguing caused Lui to hallucinate, said Martella, the defense attorney.

Lui testified that he imagined Do as “a Dracula,” sucking his blood, that he heard voices and thought she was a devil.

“I was thinking if this devil is not dying, I would be dying,” Lui said.

Ropella said Do was willing to return Lui’s Gaithersburg house to him if he moved out of her home. And the prosecutor said that after the stabbing, Lui called his wife to say: “I’ve already killed her. . . . Death is better for her.”

Lui’s strategy is to vilify “the victim to take your attention away from the conduct of the defendant,” Ropella said. “Barry Lui murdered Lan Do,” she said, “and he murdered her because he didn’t like the fact that she was making him leave her home.”

The case is scheduled to continue Monday.

According to an analysis of data from May 2011, of 300 people then detained in Maryland mental health facilities after being found not criminally responsible for their actions, 200 had committed violent crimes.

Get updates on your area delivered via e-mail