Daniel Beckwitt is accused in the death of 21-year-old Askia Khafra, who died in a Sept. 10 fire while helping dig tunnels underneath the home in Bethesda, Maryland.

WASHINGTON — A millionaire indicted Thursday in the death of a man who was killed in a fire while digging tunnels under a Bethesda, Maryland, home, will soon be out on bond.

Daniel Beckwitt was building a bunker underneath his Bethesda home because he feared “international threats, including from North Korea,” said Beckwitt’s attorney Robert Bonsib.

And, despite arguments from prosecutors, Bonsib said he will be freed after posting $100,000 cash bond. That’s because Bonspib said his client has made millions of dollars trading stocks.

The 27-year-old is accused of “depraved second-degree murder” and involuntary manslaughter in the death of 21-year-old Askia Khafra, of Silver Spring, who died in the Sept. 10 fire while digging tunnels underneath the home in Bethesda.

That network of tunnels, charging documents said, was 20 feet underground and branched out 200 feet. They had been powered by what court documents described as a “daisy chain” of extension cords, which created the fire hazard.

During a hearing Thursday, prosecutors said that Khafra had sent a text from the tunnels to Beckwitt — via an underground Wi-Fi network — hours before the fire, indicating that he smelled smoke.

Beckwitt flipped a circuit breaker twice in an attempt to fix the problem. This, they allege, is proof that the defendant was aware of a potentially serious issue, thus charging him with second-degree murder depraved heart. Prosecutors said Beckwitt disregarded the danger.

Khafra was found dead in the tunnel from smoke inhalation and thermal injuries, according to investigators.

Defense attorney Robert Bonsib said that although Beckwitt had no permit for his project, the legal standard requires him to be aware of and do something about a risk, and that the state has no evidence to prove otherwise.

The state, he added, has also not made public what fire investigators found caused the fire.

Beckwitt tried to repeatedly save the victim, Bonsib said, but heavy fumes prevented a rescue. The lawyer added that his client then called 911 and had to be hospitalized himself.

Khafra met Beckwitt online two years ago and was helping with the tunnels in return for Beckwitt’s investment in Khafra’s technology-startup company.

The lawyer characterized Beckwitt’s project as a do-it-yourself version of Cold War-era bomb shelters. “It was his project to create a secure bunker because of his concern for international threats, including from North Korea,” Bonsib said.

Khafra had worked in the tunnels on multiple occasions before the fire — sleeping, eating and even using a bucket as a toilet, Douglas Wink with the state’s attorney’s office said in court.

The victim took pride in his work, Bonsib said, and posted tunnel-activity photos on social media.

“This is a tragic accident involving the death of a young man who was a full participant in these activities, fully aware of what was going on, fully aware of what happened,” Bonsib said Thursday. When asked by a reporter whether Khafra was being held against his will in the tunnels, the defense attorney replied, “Hell no.”

Nonetheless, prosecutors argued that the millionaire is a flight risk and danger to the community, and that he should be held without bond

“The court could not reasonably predict what this defendant would do if he were released,” Wink told Circuit Judge Sharon Burrell. (Pretrial supervision had also recommended no bond after Beckwitt’s arrest last week.)

Bonsib admitted that Beckwitt “marches to the beat of his own drum,” but said his client was not a drug dealer, this is a one-time offense, and has no passport.

“I often wonder when charges are filed nine months after a crime occurred, all of a sudden he’s a danger to society,” said the lawyer, who had argued for a bond of $50,000.

Beckwitt appeared on closed-circuit TV. Throughout the hearing, he would alternate between shaking or nodding his head profusely at attorneys’ arguments. (He nodded when Bonsib called him an “unusual individual” in court.)

Charging documents filed last week also cited dangerous hoarding conditions inside the home, located at 5212 Danbury Road, and said Beckwitt was “specifically aware of the increased likelihood of a fire breaking out” but took no action.

Since the fire, Montgomery County has been in a dispute with Beckwitt — along with his father David, who owns the Bethesda home — over the home’s conditions. A civil complaint was filed by county officials, saying the tunnel network probably extended outside property lines. The Beckwitts denied those claims.

Daniel Beckwitt will be back in court June 8.