NEW YORK — First, Martha Stewart declared she is used to hard work and is not afraid of prison.

Later, in an interview with ABC News, the homemaking expert repeated that she would be able to handle it and compared her plight to that of anti-apartheid activist Nelson Mandela.

“I could do it,” she said, according to excerpts released by ABC late Friday. “I’m a really good camper. I can sleep on the ground. There are many, many good people who have gone to prison. Look at Nelson Mandela.”

Stewart’s confident demeanor was strikingly different from her attitude in the courtroom earlier Friday, as a judge sentenced her to five months in prison for lying about a stock sale.

Just before she was sentenced, Stewart — who during her trial spoke only to declare her innocence — rose from her seat and, her voice breaking almost to the point of sobs, told the judge she feared her life would be “completely destroyed.”

Stewart also was ordered to spend five months confined to her home and was fined $30,000. She was allowed to remain free pending appeal. The sentence was the minimum possible under federal guidelines.

Former broker gets same prison termPeter Bacanovic, the high-powered stockbroker who was convicted along with Stewart of lying about her stock sale in December 2001, received the same sentence of five months in prison and five months home confinement.

At his own sentencing, Bacanovic told U.S. District Judge Miriam Goldman Cedarbaum Cedarbaum he deeply regretted “the pain and the sorrow” the case had caused his family, friends, colleagues and clients.

In a four-page letter to the judge on the eve of sentencing, Stewart touted her company’s success and said she was still “abysmally confused and ill prepared for what is described to me as the next step in this process.”

She pleaded for leniency: “My hopes that my life will not be completely destroyed lie entirely in your hands.” It was signed, “Most sincerely, Martha Stewart.”

Prosecutors also released the pre-sentencing letter they sent to the judge, a document that brushed aside defense claims Stewart and Bacanovic should get lighter sentences because of exemplary conduct in their lives.

“Most of the good works cited by both defendants — showing kindness and compassion for friends, family, staff and colleagues going through difficult times, and acting as a role model for others in their professional lives — are what one should expect of decent, hardworking people,” they wrote.

Defense lawyer Robert Morvillo had asked the judge for a sentence of merely probation and community service working with poor women. He said Stewart “knows she’s not perfect” and deserved mercy.

Prosecutors, as they did when Stewart was indicted and throughout the trial, portrayed the case as a matter of preserving the integrity of government investigations.

“Citizens like Ms. Stewart who willingly take the steps to lie to officials when they are under investigation about their own conduct, those citizens should not expect the leniency that Ms. Stewart seeks,” prosecutor Karen Patton Seymour told the judge.

The judge noted she had received more than 1,500 letters from Stewart supporters across the country.

But she said a prison term was appropriate because “lying to government agencies during the course of an investigation is a very serious matter, regardless of the outcome of the investigation.”

Cedarbaum accepted a defense request to recommend to federal prison officials that Stewart serve her time at a minimum-security facility in Danbury, Conn., close to her home in Westport.

“I believe that you have suffered, and will continue to suffer, enough,” the judge said.

But Cedarbaum, citing nationwide confusion over a recent Supreme Court ruling on sentencings, allowed Stewart to postpone the sentence while her lawyers appeal her conviction — a process that could take months, and that legal experts have called an uphill battle.

Stewart resigned as CEO of the company when she was indicted last year and gave up her seat on the board after she was convicted. She remains its leading creative force and holds the title of founding editorial director.

Stock shoots upInvestors sent the stock of Martha Stewart Living Omnimedia up 37 percent, or $3.17 to close at $11.81 on the New York Stock Exchange.

The prison sentence punctuated a chain of events that began on Dec. 27, 2001, when Stewart, in a brief phone call from a Texas tarmac on her way to a Mexican vacation, sold 3,928 shares of ImClone Systems Inc., a biotechnology company run by her longtime friend Sam Waksal.

Prosecutors alleged that Bacanovic, now 42, ordered his assistant to tip Stewart that Waksal was trying to sell his shares. ImClone announced negative news the next day that sent the stock plunging. Stewart saved $51,000.

Stewart and Bacanovic always maintained she sold because of a preset plan to unload the stock when it fell to $60.

Stewart and Bacanovic were found guilty on four counts apiece on March 5.

In April, lawyers for both defendants accused one juror of lying about an arrest record in order to get on the trial. Cedarbaum denied a request for a new trial, saying there was no proof the juror lied or was biased.

And in May, federal prosecutors accused Larry F. Stewart, a Secret Service ink expert, of lying repeatedly in his testimony at the trial — mostly about the role he played in ink-analysis testing of a stock worksheet.

Just last week, Cedarbaum again denied new trials for Stewart and Bacanovic, this time saying there was “overwhelming independent evidence” to support the guilty verdicts.

The juror issue and the perjury charges against Larry Stewart, no relation to Martha Stewart, are expected to form the basis of Martha Stewart’s appeal to the 2nd U.S. Circuit Court of Appeals.

Additionally, lawyers said Friday they will argue that prosecutors inappropriately suggested at trial that Stewart was charged with insider trading — a count never included in the indictment against her.

“The whole atmosphere of the trial was one about a crime that was never charged and never happened,” said Walter Dellinger, a lawyer hired specifically to handle the appeal.