NEW YORK — Former WorldCom finance chief Scott Sullivan was sentenced to five years in prison Thursday by a judge who called him “the architect” of the largest accounting fraud in U.S. history.

U.S. District Judge Barbara Jones said she was giving Sullivan a break because he had helped the government build its case against ex-CEO Bernard Ebbers and because his wife is extremely ill.

Still, the judge said, “Mr. Sullivan’s offenses were of the highest magnitude. Mr. Sullivan, I believe, was the architect of the fraud at WorldCom.”

Sullivan became the fifth WorldCom executive to be sentenced to prison in the $11 billion scandal. His sentence is topped only by that of Ebbers, who got 25 years.

Before he was sentenced, Sullivan told the court he was ashamed and embarrassed.

“I will carry the burden of my failing always,” he said. “I am sorry for the hurt that has been caused by my cowardly decisions. I truly am, Your Honor.”

Sullivan was ordered to report to prison Nov. 11. The judge said she would recommend he be assigned to the federal prison in Pensacola, Fla., near his home, and that he be placed in an alcohol treatment program.

Sullivan told the judge his wife is severely diabetic and has been taken to the hospital for emergencies nine times this year alone. The couple have a 4-year-old daughter.

“The life of a 4-year-old girl hangs in the balance,” Sullivan’s lawyer Irv Nathan told the judge before the sentence was imposed.

Star witnessSullivan, 43, was the star witness at Ebbers’ trial earlier this year, testifying the CEO repeatedly instructed him to “hit the numbers” — or adjust WorldCom’s books to meet Wall Street expectations.

For most of the investigation of WorldCom’s collapse, Sullivan was the highest-ranking executive charged. But just before his trial began in 2004, Sullivan pleaded guilty to fraud and agreed to testify against Ebbers.

The Ebbers trial amounted to a question of whom jurors believed. The defense always claimed that Sullivan was the mastermind of the fraud, and kept his boss in the dark.

Prosecutors have lauded Sullivan as a model cooperator. In court on Thursday, prosecutor David Anders gave Sullivan credit for the time and effort he spent helping the government.

“Mr. Sullivan wasn’t the cause of the fraud. Mr. Ebbers was,” Anders told the judge. “Yet without Mr. Sullivan’s cooperation, it’s likely that Mr. Ebbers never would have been brought to justice.”

Sullivan, in more than 30 hours of testimony at Ebbers’ trial, said he repeatedly expressed his reservations to Ebbers about cooking the books but was overruled by his boss.

“I told Bernie, ’This isn’t right,”’ Sullivan said, describing an October 2000 meeting in which he said he showed Ebbers a plan to improperly create $133 million in revenue. “He just stared at it, and he looked up at me and he said, ’We have to hit our numbers.”’

Sullivan has already agreed to sell the $11 million mansion he is building with his wife in Boca Raton, Fla., to settle a lawsuit brought by former WorldCom shareholders.

The house is a lavish, 30,000-square-foot, Mediterranean-style mansion with 10 bedrooms, nine bathrooms and seven fireplaces made of carved stone and mahogany.

Former WorldCom controller David Myers, a key cooperator in the government’s case, and former accounting director Buford Yates each were sentenced earlier this week to a year and a day in prison.

Accounting manager Betty Vinson will serve five months in prison and five months of house arrest. Another accountant, Troy Normand, got three years of probation.

WorldCom collapsed in 2002 when the fraud became known. It emerged last year and now operates as MCI.