BOSTON — Actress Felicity Huffman was sentenced Friday to 14 days in prison for paying to rig her daughter’s university entrance exams, a narrow victory for prosecutors in the college admissions case who wanted a heavier penalty, but argued some amount time behind bars for Huffman and other wealthy parents can be “the only leveler” against their money and influence.

In ordering her to do a stint behind bars, U.S. District Judge Indira Talwani rejected pleas from Huffman, 56, and her attorney, who said the television star was remorseful and should be spared incarceration.

Friday’s hearing in Boston capped months of embarrassing scrutiny for the “Desperate Housewives” star, whose reputation in Hollywood as a down-to-earth anti-diva has been tarnished by the revelation she paid $15,000 to William “Rick” Singer, a college admissions consultant who preyed on his wealthy clients’ anxieties about getting their kids into top schools and their willingness to pay huge sums to access his illicit operation.

In March, Huffman was one of 33 parents charged in a sweeping investigation into Singer’s scheme. Some, like Huffman, were accused of paying Singer to boost their children’s SAT and ACT scores. Others were alleged to have paid larger, six-figure sums to slip their children into elite schools — Yale, Stanford, Georgetown, UCLA and the University of Southern California, among others — as purported athletic recruits for sports they didn’t play.

Along with the parents, federal prosecutors in Boston charged about a dozen college coaches, test proctors and administrators with conspiring with Singer in what the U.S attorney’s office in Massachusetts called the country’s largest-ever investigation into corruption in college admissions. Singer pleaded guilty and helped prosecutors build their cases against Huffman and other parents.

Huffman was among 15 parents who didn’t fight the government’s case, pleading guilty in May. A dozen more parents who have admitted to conspiring with Singer are slated to be sentenced over the coming months, many of them by Talwani. Other parents have pleaded not guilty to fraud and money laundering charges.

Assistant U.S. Attorney Eric Rosen had asked Talwani to sentence Huffman to a month in prison. Rosen has also requested sentences ranging from one to 15 months in prison for the other parents who have pleaded guilty, depending largely on how much money they paid Singer.

In making the case for why Singer’s clients should be incarcerated, the prosecutor described them in a court filing as suffering from “an astonishing degree of self-entitlement and moral insularity.”

Rosen has tried to portray the case as an opportunity for the government and judicial system to push back against the greed and out-sized buying power of the wealthy in the country’s higher education system.

“Some period of incarceration is the only meaningful sanction for these crimes. Not because the defendants’ relative wealth has generated public resentment, but because jail is a particularly meaningful response to this kind of offense,” Rosen wrote. “For wrongdoing that is predicated on wealth and rationalized by a sense of privilege, incarceration is the only leveler: In prison everyone is treated the same, dressed the same, and intermingled regardless of affluence, position or fame.”

In sending Huffman to prison, Talwani seemed to signal she agreed with Rosen. Among the parents in the case, she paid Singer the least amount of money and seemed to stand the best chance of avoiding time in custody.

In a letter sent to Talwani, Huffman said she sought out Singer not to rig her daughter’s exams, but to provide legitimate college counseling to her daughter. Singer and his employees had been tutoring the girl for about a year when Singer told Huffman her math scores weren’t high enough to get her an audition at the colleges she hoped to attend, Huffman’s attorneys said.

Singer told Huffman he had a “proctor” — Mark Riddell, a Harvard graduate in his mid-30s — who could fix her daughter’s test, Huffman wrote in the letter.

“We will make sure she gets the score she needs,” he told Huffman, according to her letter.

Huffman said she was “shocked” to hear it could be done. She mulled it over for six weeks, she said, feeling a mounting sense of panic that her daughter might be barred from “getting a shot at auditioning and doing what she loves because she can’t do math.”

“As warped as this sounds now,” she said in the letter, “I honestly began to feel that maybe I would be a bad mother if I didn’t do what Mr. Singer was suggesting.”

In response, Rosen pointed out a court filing that Huffman’s deal with Singer wasn’t made on impulse.

“Her decision to engage in crime was deliberate and considered,” Rosen said. “She thought about it and decided to commit fraud only after a period of reflection.”

Singer texted Huffman in October 2017.

“Are we doing this on her own or with my help?” he asked, according to Huffman’s attorneys.

“With your help,” Huffman replied.

Two months later, Huffman’s daughter took the SAT at a private school in West Hollywood. Unbeknownst to the girl, both Huffman and prosecutors say, Singer paid an administrator at the school to let Riddell correct her answers once she’d finished the test.

Along with Singer, Riddell has pleaded guilty in the case and is awaiting sentencing. The school administrator, Igor Dvorskiy, has pleaded not guilty to conspiracy to commit racketeering.