PORTLAND, Maine — The owner of an iconic waterfront restaurant is scheduled to plead guilty to tax evasion as part of a settlement deal that will see her serve jail time and reimburse the state for more than $1 million in unpaid sales tax.

Cynthia Brown, the proprietor of J’s Oyster Bar on Portland Pier, is set to plead guilty to five criminal counts including felony charges of tax evasion and theft by misapplication of sales tax, according to a plea agreement filed with the Cumberland County Superior Court.

J’s has been lauded by the likes of celebrity chef Anthony Bourdain and Gourmet Magazine, among others.

The plea deal will resolve one of several cases that the Maine Revenue Service brought against Cumberland County restaurants last year.

Under the terms of the agreement, Brown must pay the state $1,077,045 in monthly chunks of $8,000 to $10,000 and will be sentenced to four years behind bars, with all but four months suspended, and two years of probation, according to court documents. She was indicted in March 2016 on 21 tax-related counts: seven felonies and 14 misdemeanors.

The agreement was struck in January and gave Brown six months to make an “additional payment” of $500,000 to the Maine Revenue Service or face having her jail time extended to 9 months, the court filings state.

Sitting at J’s polished wood bar in a pink tanktop Monday, Brown expressed frustration with the state’s insistence that she serve jail time for what she said was an unintentional offense. As staff bustled about her pulling pints and shucking oysters, she explained that over several years she had “grossly underestimated” her sales because she was struggling with mental illness and spending little time attending to the restaurant’s business.

“The truth is I do owe the sales tax. I have no problem with that,” Brown said. “But … I have in good faith been paying all this money back.”

Brown is scheduled to appear in court on July 10 to plead guilty, but her lawyer Thomas Hallett said they are working to push that date back to October so she can repay more of the tax money. Assistant Attorney General Gregg Bernstein, who is handling the case, did not respond to a request for comment.

Hallett said that Brown’s debt would have been better handled as a civil matter, but that he’s personally handled five cases similar to J’s in recent years. The lawyer said he also knows other restaurant owners in Maine who have faced criminal charges for unpaid taxes as part of a state crackdown that he dates to 2012.

“Traditionally, that state of Maine was pretty lax in its assessments of businesses like this,” said the lawyer. “They recognized that Maine is a tough place to do business and these businesses employ people.”

That changed five years ago when major credit card companies began informing state tax agencies of the amounts they were paying out to different businesses and assessors began to notice discrepancies, Hallett said.

Brown said that she has already repaid about $250,000, is now paying the state at a rate of $5,000 a week and has secured a $700,000 loan to repay the remainder. But the prospect of being sent to jail just as tourist season comes into full swing was disheartening to the restaurateur.

“I want to get this done before I go away, so I’m just going to work my ass off all summer,” said Brown. “I gotta get straight with what I owe, you know.”