BOSTON — Actress Felicity Huffman, one of the biggest names caught up in a college-admissions scandal that rocked elite universities around the country, was sentenced to 14 days behind bars on Friday for her role in the sweeping scam.

"I am deeply sorry to the students, schools, and universities, that are impacted by my actions," Huffman said, while choking up as she read a prepared statement.

"I take full responsibility for my actions and as a first step for making amends for my crime. I will accept whatever punishment you deem appropriate."

Download the NBC News app for breaking news and politics

The one-time Oscar nominee, who came to court holding hands with her actor husband, William H. Macy, will also have to pay a fine of $30,000 and perform 250 hours of community service under the sentence handed down by U.S. District Judge Indira Talwani.

The judge said this scandal showed a greater imbalance in America, with rich parents able to give their kids more advantages.

"This is a system which does not have a pure meritocracy and a person in position of wealth and position you are is in a much easier position in this meritocracy of college admissions," Talwani said.

“In a system of that sort, in that context, that you took the step of obtaining one more advantage to put your child over theirs.”

The judge said she didn't relish sending Huffman to prison, but believed it was the right call.

"I don't think anyone wants to be going to prison, I do think this is the right sentence here," she said. "You move forward and you can rebuild your life after this. You pay your dues."

The actress was ordered to report to prison by Oct. 25.

As the hearing wrapped up, Macy came up to his wife and put his hands on her shoulders. She grabbed Macy's hand, and the actress' eyes appeared puffy as though she'd been crying.

"Ms. Huffman, I wish you success moving forward," the judge said.

"Thank you," Huffman responded.

Huffman, 56, pleaded guilty to mail fraud and honest services fraud in May for paying $15,000 to college fixer Rick Singer to cheat on daughter Sophia Grace Macy's SAT in 2017.

"I am so sorry Sophia," she said. "I was frightened. I was stupid and I was so wrong. I am deeply ashamed of what I have done."

Huffman paid for someone to proctor and correct Sophia’s test, which resulted in her score jumping 400 points above her PSAT performance to 1420 out of a possible 1600.

She was the first parent to be sentenced in the scheme.

Huffman told the judge she had second thoughts about the scheme as they drove to the testing center.

"I thought to myself, 'Turn around, turn the car around,' " she said."I am so ashamed."

When the cheating scandal came to light, Huffman's said her daughter was in disbelief.

"My daughter said, 'I don't know who you are anymore,' " Huffman said. "I have inflicted more damage than I could have imagined."

Prosecutors had wanted Huffman to spend a month in prison, to go along with supervised release and a $20,000 fine.

"Most parents have the moral compass not to lie but the defendant did not," prosecutor Eric Rosen said to Talwani at Friday's sentencing. "This was not a blunder or a mistake. This was intentional criminal conduct that took place over 16 months."

"In prison, there is no paparazzi. Everyone is the same, everyone wears the same clothes," Rosen said while praising her skills as an actress and ability to find future work. "Prison is the ultimate leveler."

Defense lawyers insisted their client's crimes did not merit incarceration, and their argument appeared to get a boost this week when a U.S. Probation and Pretrial Services report found that there was "no victim" or any "actual or intended loss" in Huffman's SAT scam.

"She knew what she did was wrong and her moral compass allowed her to realize that," Huffman's lawyer, Martin Murphy, told the judge on Friday. He noted that Huffman's daughter is not going to any school next year.

Probation officials said the government was incorrect in setting Huffman’s sentencing range at four to nine months because the amount of money she paid should not be a factor in her sentencing. Huffman should instead be subject to the lowest sentencing guidelines of zero prison time to six months, according to the probation report.

And for much of the hearing, it appeared Judge Talwani was leaning against sending Huffman to prison, repeating elements of the probation report.

She even questioned why FBI agents, guns drawn, needed to go into Huffman's home to make the arrest.

"I don't know why an arrest with guns in her case was necessary any more than I understand why an arrest with guns is necessary in many cases," she said. "It's really a side issue and not an ideal way for things to proceed. But that is not for today."

Huffman, best known for the TV series "Desperate Housewives" and her Oscar-nominated work in "Transamerica," is the most famous of of 50 people charged in the sweeping college entrance cheating scheme.

The FBI probe, dubbed "Operation Varsity Blues" revealed how well-heeled parents paid Singer to get their children into elite universities by boosting their college board test scores or passing them off as top athletes worthy of special admission.

Actress Lori Loughlin and her fashion designer husband, Mossimo Giannulli, have also been charged.

Prominent U.S. universities involved in Singer's scheme included Yale, Georgetown, Stanford and the University of Southern California.

In a letter to the judge last week, Huffman admitted to making bad choices because she was worried that her daughter's learning disabilities would hamper the young lady's future.

Huffman's husband, Macy, was not charged in "Operation Varsity Blues."

As Huffman left court, she walked quickly past reporters and did not answer any questions.

In a prepared statement, Huffman also apologized to parents who don't have her resources but still manage to get their children into college.

"And I especially want to apologize to the students who work hard every day to get into college, and to their parents who make tremendous sacrifices supporting their children," according to her statement.

"I can promise you that in the months and years to come that I will try and live a more honest life, serve as a better role model for my daughters and family and continue to contribute my time and energies wherever I am needed. My hope now is that my family, my friends and my community will forgive me for my actions."

Ezra Kaplan reported from Boston and David K. Li from New York