A wealthy Maryland stock trader was found guilty of second-degree murder and involuntary manslaughter Wednesday in connection with a deadly fire in a network of tunnels he planned to use as an underground nuclear bunker.

Jurors deliberated for approximately 12 hours before convicting 27-year-old Daniel Beckwitt in the September 2017 death of Askia Khafra, 21. Beckwitt faces up to 30 years in prison at a sentencing set for June 17.

Montgomery County prosecutor Marybeth Ayres said Beckwitt was responsible for creating extreme hoarding conditions that trapped Khafra in the tunnels under Beckwitt's Bethesda home when a fire broke out in the basement. They said Beckwitt had sacrificed safety for secrecy and placed Khafra's life in danger, with mounds of trash blocking potential escape routes.

"This was a survivable fire, and we know that because the defendant survived," Ayres said Tuesday during closing arguments.

Defense attorney Robert Bonsib told jurors the fire was an accident, not a crime, and claimed that Khafra had worked in Beckwitt's house and tunnels for months and knew his way around the property. Beckwitt did not testify at his trial, which lasted nearly two weeks.

Fox 5 DC reported that Beckwitt gasped and began weeping when the verdict was read. He shook his head as court officers handcuffed him. Judge Margaret Schweitzer agreed to revoke Beckwitt's $100,000 bond.

Bonsib said afterward that he would appeal, adding that he believed the jurors may have been unfairly influenced by photos of the conditions at Beckwitt's home.

"The problem is the pictures of the hoarding condition did not reveal what the path out of the home looked like before the fire," Bonsib said. "I just told him there's a lot more fight in this case."

Khafra met Beckwitt online and Beckwitt had invested money in a company Khafra was trying to launch as he helped Beckwitt dig the tunnels. Khafra worked in the tunnels for days at a time, eating and sleeping in there. They had lights, an air circulation system and a heater.

A hole in the concrete basement floor led to a shaft that dropped down 20 feet into tunnels that branched out roughly 200 feet in length. Investigators concluded the blaze was ignited by a defective electrical outlet in the basement.

Beckwitt went to elaborate lengths to keep the project a secret. Jurors heard that he tried to trick Khafra into thinking they were digging the tunnels in Virginia instead of Maryland by having him don "blackout glasses" before taking him on a long drive. They also were told Beckwitt used internet "spoofing" to make it appear they were digging in Virginia.

CLICK HERE TO GET THE FOX NEWS APP

Bonsib described his client as a "very strange young man" but urged jurors to look past his idiosyncratic personality.

"Being different, living in a different circumstance is not a crime," he said.

Hours before the fire broke out in the basement, Khafra texted Beckwitt to warn him it smelled like smoke in the tunnels. Ayres said Beckwitt didn't respond for more than six hours before telling Khafra that there had been a "major electrical failure." Instead of getting Khafra out of the tunnels, Beckwitt told him that he "just switched it all over to another circuit," according to the prosecutor.

Bonsib said Beckwitt screamed for help from neighbors after the fire broke out and risked his own safety in a failed attempt to rescue his friend from the blaze. Firefighters found Khafra's naked, charred body in the basement, only a few steps from an exit.

Click for more from Fox5DC.com.

The Associated Press contributed to this report.