PROVIDENCE, R.I. — The 18-year-old Cranston man accused of killing his mother’s boyfriend in July 2017 described in testimony Wednesday the highly intoxicated couple arguing for hours leading up to the shooting.

A calm and collected Xavier Vidot took the stand Wednesday in his own defense in his trial for allegedly fatally shooting 24-year-old Valdez Loiseau, July 17, 2017. Authorities found Loiseau’s body partially burned, with gunshot wounds, at a roadside in Attleboro.

Vidot’s mother, Melonie Perez, 37, had also been on trial, but Superior Court Judge Robert D. Krause informed the jury early in the day that her case had been resolved. The judge did not provide details.

Vidot, who has pleaded not guilty, is arguing that he shot Loiseau amid a struggle after seeing him beating his mom.

Vidot told of Perez sobbing and wailing on the kitchen floor early July 17 about crashing her new car. He tried to get her to go to sleep, but she insisted that he drive her to his father’s, her ex-husband’s, home.

As his mother slept on the couch there, Loiseau “blew up her phone” with messages and calls. Vidot recalled silencing the phone. Loiseau began messaging and calling him instead. Loiseau told him to bring Perez back to the 15 Edgewood Ave. home they shared in Cranston for something important. He would not say what it was, Vidot said.

Vidot said he arranged for Loiseau to be driven to his father’s house via Uber. There, Loiseau proceeded to wake Perez up and together they got her into the car and set out on a “terrifying” ride home as Loiseau was intoxicated, Vidot said.

Perez fell asleep at home, but again Loiseau woke her up and insisted the couple go out, Vidot said.

An hour and a half later, Perez returned alone. “She was crying ‘He wrecked my car. He wrecked my car,’” Vidot recalled under questioning by his lawyer, John M. Cicilline. The passenger side of the car was now bashed in.

An upset Loiseau returned 25 minutes later complaining that Perez had left him at the crash scene, forcing him to get a ride with “a random white dude,” Vidot said.

Over the ensuing hours, Perez and Loiseau went around and around arguing about the crash and Perez leaving Loiseau. Perez threatened to call the police and Loiseau took her cell phone, Vidot said.

Vidot recounted his grandmother coming over and all of them walking to the Al Mall corner store. It’s then that Perez ran back to the house and locked everyone else out. Around 10 p.m., Vidot said he heard footsteps on the porch roof and saw Loiseau get in through a window. Vidot then entered through a kitchen window.

“They’re back at it,” Vidot said of Perez and Loiseau. “There was grabbing and pushing ... but never any blows.”

He heard his mother scream “Leave me alone” and then the bang of a gunshot, he said. He ran upstairs to find his mother in the corner of the master bedroom and Loiseau pacing and ranting, he said.

According to his account, Loiseau grabbed a Taurus handgun off the bureau as a 9 mm Beretta sat on the bed. A shirtless, aggressive, stumbling Loiseau began taunting him and shot at the ceiling. Still pacing, Loiseau dropped the gun. Vidot said he grabbed both firearms, hiding the Beretta under a mattress upstairs and the Taurus under a couch cushion on the first floor.

He put the Taurus in his waistband and ran upstairs again after his mother screamed again, he said. This time he saw Loiseau lifting Perez off the floor by her hair and smacking her stomach, he said.

“I said ‘Stop, you’re crossing the line. You’ve got to go,’” Vidot said. He grabbed Loiseau’s arm and Loiseau lunged at him, he said.

“I’m scared, so I pull out a gun and fire one shot,” Vidot said. Loiseau landed on top of him still moving, he said.

“I was thinking he was gonna try to overpower me and get the gun,” Vidot said. He ran into the other bedroom and retrieved the Beretta and shot Loiseau again, he said.

His mother rose from the floor. “She said ‘thank you and I’m so sorry,’” he said.

Under vigorous questioning by Special Assistant Attorney General Robert Johnson, Vidot told jurors he ran to get the Beretta after the Taurus failed to fire a second shot at Loiseau.

In addition, he recalled running upstairs after hearing two shots, not one. He told of being “bewildered” that Perez and Loiseau were shooting guns at each other and that he had taken the firearms to remove them from the “equation.”

Johnson asked about Vidot’s account to investigators that he grabbed the Beretta “to finish the job” and then shot Loiseau in the back of the head.

“Not to finish the job. I still thought he was a threat,” Vidot said, adding that he was extremely intoxicated when he spoke with police.

“No calls to 911?” Johnson asked. “No.” Vidot said. Did they check Loiseau’s pulse? “No,” Vidot said.