A D.C. man who had been accused of dousing his pregnant girlfriend with gasoline and setting her on fire was acquitted Thursday of attempted murder and other charges.

During an eight-day trial in Prince George’s County Circuit Court, prosecutors argued that Laquinn Phillips did not want the baby and took action when his girlfriend Andrea Grinage would not get an abortion.

Phillips maintained his innocence, and his lawyer presented a very different version of events. The defense suggested that Grinage set herself aflame to capture Phillips’s attention amid a complicated love triangle. Grinage suffered from chronic depression and was jealous of another woman who was Phillips’s fiancee, said defense attorney J. Wyndal Gordon.

“If she couldn’t have him, nobody can,” Gordon told the jury.

The case stems from a fire that started the morning of Sept. 8, 2017, in the Capitol Heights apartment where Grinage lived. Grinage — seven months pregnant — came out of the apartment, naked and with her skin peeling from her body, and told a neighbor, “My boyfriend just set me on fire,” according to court testimony.

Grinage suffered burns on more than 90 percent of her body and was rushed to a hospital for an emergency C-section. The baby, Journey, emerged blue and was not breathing but survived. Grinage, 32, recovered after spending two months in the hospital.

Both mother and daughter were in the courtroom for the trial 15 months after Phillips, 35, was arrested.

Prosecutors said Phillips burned Grinage because he didn’t want a new baby to get in the way of a life he was planning with another woman, his fiancee. Prosecutors displayed a text message of Grinage sending Phillips the results of a pregnancy test.

“Please tell me that’s not saying you are,” Phillips replied to the image.

Prince George’s State’s Attorney Aisha Braveboy expressed disappointment with the verdict but said she respects the jury’s decision. Braveboy said that though it was a circumstantial case, she felt prosecutors presented strong evidence against Phillips.

“The real victory was baby Journey was born healthy and is thriving,” Braveboy said.

The verdict sparked sobs and screams in the courtroom. Twenty deputies stood on hand after a scuffle between the families erupted Thursday morning.

Grinage was already the mother of two boys when she was expecting her first girl in the fall of 2017.

Grinage was on her way to work and was seven weeks away from giving birth when, by prosecutors’ account, Phillips confronted her in her apartment. The visit was unusual since Phillips normally called or texted before showing up, the government said.

Suddenly, Phillips came up from behind and started choking Grinage until she passed out, she testified. When she regained consciousness, she found herself wet on the floor and lying on her stomach, she said. Phillips offered to take her to the hospital but told her to clean up in the bathroom, she testified.

“The next thing you know, she’s being doused with gasoline and being set on fire,” Prince George’s Assistant State’s Attorney Sonia Owens said.

Grinage ran out of her apartment building, naked and burned and looking for help, according to court testimony.

“Q just set me on fire!” Grinage told her mother over the phone before she was taken to a hospital, according to court testimony.

A doctor testified that Grinage had a 1 percent chance of survival after suffering burns on 90 percent of her body.

Prosecutors presented the jury with text exchanges showing Phillips’s fiancee upset over the child he was going to have with another woman.

Assistant State’s Attorney Christina Taylor told jurors that Phillips “wanted to leave Andrea and Journey in the dust and move on with his own life.”

But Phillips said he was not at Grinage’s apartment when she was burned. Since the time of his arrest, Phillips and his family have denied he was responsible.

Gordon suggested that Grinage burned herself. He said she had mental-health issues, was hormonal from the pregnancy and stressed with a new baby on the way.

He questioned why she wasn’t more concerned about her baby when she came out of the fiery apartment and why she couldn’t testify how exactly she was set on fire. Police didn’t recover matches or lighters from the scene.

“It could have been static electricity for all we know,” Gordon told the jury.

Though the state showed text messages showing Phillips denying the baby was his and being upset Grinage was pregnant, Gordon said his client “had a change of heart.” Grinage testified that she and Phillips selected a name for the baby together. And near the end of her pregnancy, he said that they were “lifers” and that he would support the child, Gordon said.

In trying to cast doubt for the jury, Gordon noted there was no DNA evidence linking Phillips to the scene. And when police caught up with Phillips later that day, Gordon said, there was no gasoline on his clothing.

Phillips, who was set to be a D.C. firefighter before he was charged, had no prior record and worked as a personal trainer, Gordon said.

Gordon said his client will now try to put his life back together — including trying to rejoin the D.C. fire/EMS academy.