Peter Bang, front, walks into the U.S. District Court for the District of Maryland in Greenbelt on Friday with his lawyer, Gerald W. Kelly Jr. (Sarah L. Voisin/The Washington Post)

Byung Il “Peter” Bang, the former Montgomery County economic development official who admitted to stealing $6.7 million from the county, was sentenced Friday to four years in prison.

In a hearing that stretched for more than two hours, U.S. District Judge Paula Xinis underscored the seriousness of the offense — which she called a “doozy” — while also noting Bang’s role as a devoted husband and father, and his efforts to seek help for the gambling addiction that prosecutors say motivated him to steal from government coffers.

“This was a purposeful plan that involved the largest theft in Montgomery County history, and I cannot look away from that,” Xinis said.

Bang pleaded guilty Nov. 16 to two federal charges — one of wire fraud and the other of fraud and false statements — and to state charges of a theft scheme over $100,000 and misconduct in office. Sentencing in the state case is scheduled for next month.

In the moments before Xinis made her ruling, Bang addressed the court, repeatedly saying he took “full responsibility” for the years-long theft. But he quibbled with some points raised during the hearing, arguing, for example, that a shell company prosecutors say he set up to further the scheme was actually initially created for legitimate purposes.

“At this point, I have no excuse,” Bang told the judge, lawyers and spectators in U.S. District Court for the District of Maryland in Greenbelt. “I want to express remorse, shame and offer apologies to my former employer and colleagues.”

He said he hasn’t gambled since 2016 and has been undergoing treatment with a psychologist, who diagnosed him as a “compulsive gambler with deep-rooted emotional and mental issues.”

Prosecutors had asked Xinis to sentence Bang to five years on the first federal charge, with an additional three years to run concurrently on the second.

Xinis imposed a 48-month sentence for the first charge and 36 months for the second, to be served concurrently. She said his state sentence also should be served concurrently.

“He has arguably put a black mark on Montgomery County,” said Assistant U.S. Attorney Thomas Sullivan, noting that Bang stole from a department tasked with bringing economic development to the Maryland suburb of 1.1 million people. “Are businesses going to come to Montgomery County when they know this type of malfeasance has occurred?”

Bang’s wife, Youn Jung, and his pastor both spoke at the hearing, emphasizing his role as a family man, albeit with psychological issues.

In a soft, halting voice, his wife recounted her life with him. “I asked him why, and my husband said, ‘I don’t know,’” she said as Bang stared straight ahead, his fingers interlaced before him.

Bang’s attorney, Gerald W. Kelly Jr., of Columbia, had requested three years in prison for his client.

“A gambling addiction and untreated mental health condition directly related to his conduct,” Kelly said to the judge. “Mr. Bang stands before this court with sincere remorse for his crimes.”

But Deputy County Attorney John Markovs, speaking for Montgomery County, called Bang’s crime “a case of public corruption at the highest level.”

“While Mr. Bang may be a loving husband and father, that belies his intentions,” Markovs said. “His embezzlement of county money is not a victimless crime.”

As the chief operating officer of the county’s Department of Economic Development, Bang directed the creation of a fake company — the Chungbuk Incubator Fund LLC — then directed millions in county funds to it, court records show.

He used the money for his personal benefit, prosecutors said, gambling with hundreds of thousands of dollars at casinos across the country.

Bang was the only one charged in the scheme, which ran from 2010 until 2016, when his department was disbanded and he was moved to the county’s finance department. The theft was discovered by the Internal Revenue Service, which began investigating Bang’s activity at casinos after he wouldn’t disclose the source of the large cashier’s checks he brought with him to gamble.

Bang was fired from county government in June 2017 and has since found a job as an office manager at a cleaning company in Virginia.

In addition to the 48 months in prison, Bang will have three years of post-release supervision and be required to continue to seek gambling and mental health treatment. Kelly, who after court called Xinis’s ruling “very thoughtful and well-considered,” has requested Bang serve his time at a federal prison facility in Cumberland, Md.

Xinis will finalize her ruling on March 1 when the parties are scheduled to appear in court to discuss delivering the roughly $1 million in Bang’s retirement account and an additional $137,925 that Kelly is holding in escrow to Montgomery County as partial restitution.

“Mr. Bang lied to his colleagues, government officials and the IRS over an extended period of time,” U.S. Attorney Robert K. Hur said in a statement. “Corrupt public employees undermine everyone’s faith in government.”