Shortly after her indictment by a federal grand jury, Martha Stewart decided to step down Wednesday evening as chairwoman and CEO of her namesake company in what may be the best decision of a bad lot of choices for her and the company.

Stewart, who is facing federal criminal and civil charges, will remain with Martha Stewart Living Omnimedia ( MSO) as a director and as its new chief creative officer.

The move allows the company to put some distance between it and her while still retaining Stewart's cachet, said Seth Taube, chairman of the securities litigation department at law firm McCarter & English.

"This was the right decision for the company," said Taube. "This gives investors the confidence that her brand name and creative help will remain, but that the business of the company will be run by people without integrity issues."

Jeffrey Ubben, head of a private investment firm and the largest shareholder after Stewart herself, will serve as chairman, and company President Sharon Patrick will become CEO, the company said.

"I love this Company, its people, and everything it stands for and I am stepping aside as Chairman and CEO because it is the right thing to do," Stewart said in a prepared statement. "This will enable the Company to continue to build the confidence and love of its readers, viewers, customers and strategic partners, without the distraction of my personal legal issues."

Just hours earlier, Stewart was indicted on charges of conspiracy, obstruction of justice and making false statements. In addition to those criminal charges, the Securities and Exchange Commission brought civil charges against Stewart, accusing her of insider trading.

The charges relate to Stewart's sale of ImClone Systems ( IMCLE) stock just before the Food and Drug Administration rejected a drug produced by ImClone, a move that sent the company's stock price tumbling.

The SEC is seeking to bar Stewart from serving as a director of Martha Stewart Living or any other public company. And the agency is seeking to limit what she can do at the company as well.

But the SEC chose not to try to bar Stewart from serving as an officer because of the role she plays at her company, said Barry Rashkover, associate director of the SEC's northeast regional office. That left open the possibility that Stewart could remain an officer of Martha Stewart Living even if she's found guilty of the civil and criminal charges.

"We're seeking a remedy that is appropriate for these particular facts," Rashkover said.

By making that distinction, regulators may have been trying to sidestep the kind of reaction they got for a perceived heavy-handed approach against Arthur Andersen.

Critics charged that the Justice Department's decision to file a criminal indictment against the whole company was essentially a death warrant. Indeed, following the indictment and its later conviction on the charges, Arthur Andersen lost nearly all of it clients and laid off all but a token staff.

Stewart's decision to step aside as the leader of Martha Stewart Living while still staying involved with the company coincides with the thinking of some marketing experts. Those experts said that the company had little choice in the short term but to back Stewart, because so much of Martha Stewart Living's value is wrapped up in Stewart's persona and public image. But some suggested that the company may need to find a way to distance itself from her.

While Stewart's move may satisfy critics for now, it doesn't address what might happen if she's found guilty of the charges against her. Even if she could legally remain an officer of the company after that, the company may not want her to do so, said Ron Geffner, a former enforcement official with the SEC and a securities attorney with Sadis & Goldberg in New York.

In fact, assuming that the company could find a way to force her out -- a big assumption considering Stewart controls nearly 94% of the voting stock of Martha Stewart Living -- it's unlikely she could find a job anywhere as an officer or even a consultant if she's convicted, Geffner said.

"She's going to be a hot potato for a while," Geffner said.

And that's assuming she doesn't end up in prison. The criminal charges Stewart faces carry a three-year minimum sentence, noted Taube, who also is a former enforcement official with the SEC.

"Martha Stewart is that company's intellectual property and you can't bank that from prison," Taube said.

The problem for the company is that it's in something close to a no-win situation, said one fund manager, who asked to remain anonymous. Even with Stewart, the company has lost money the last two quarters. And with the charges filed against her, the company's situation isn't likely to improve anytime soon, said the fund manager, a longtime observer of Martha Stewart Living.

Already, advertisers are reassessing whether they want to run ads in Martha Stewart Living's magazines, the fund manager said. The company soon may have to start worrying about whether its audience will be turned off by the scandal as well. And while the trial unfolds, the company risks losing much of its talent to rival companies, the fund manager said.

"It's abundantly clear that things have eroded in spectacular fashion," said the fund manager, who does not have a stake in Martha Stewart Living. And don't expect things to turn around even if Stewart is cleared of all charges and stays at the company, the fund manager said.

"Even in a best-case scenario, it's dubious whether this company can turn a profit."

The dilemma facing Martha Stewart Living is that without Stewart, there's not much left of the company, said the fund manager. Stewart's persona is the underpinning for nearly all of the company's business, from its magazines to its television specials to its Martha Stewart-branded products.

Martha Stewart Living possibly could try to carve out a niche for itself offering something similar to its current line of products and magazines but without the "Martha Stewart" label, the fund manager said. But the audience for that would be far smaller than the company's current audience. And positioning Martha Stewart Living to cater to that smaller audience would involve a wrenching transition, involving mass layoffs, steep cutbacks and creating some kind of new image or persona to embody the company's ideals, the fund manager said.

"This organization may have an impossible time making that transition," said the fund manager. "You're probably better off starting such an entity from scratch."

Staff Reporter Bill Snyder contributed to this report.

More from Stocks

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Complying With GDPR Could Be Costly for Facebook, Google and Other Tech Giants

Complying With GDPR Could Be Costly for Facebook, Google and Other Tech Giants

North Korea, Apple, GPDR and Gap - 5 Things You Must Know

North Korea, Apple, GPDR and Gap - 5 Things You Must Know

Market Can't Handle the Wild Ride: Cramer's 'Mad Money' Recap (Thursday 5/24/18)

Market Can't Handle the Wild Ride: Cramer's 'Mad Money' Recap (Thursday 5/24/18)

Replay: Jim Cramer on North Korea, Oil Prices, Apple and Carnival Corporation

Replay: Jim Cramer on North Korea, Oil Prices, Apple and Carnival Corporation