A year ago, the feel-good Hollywood couple Felicity Huffman and William H. Macy made a $15,000 donation to Key World Foundation. A bookkeeper for the charity wrote back saying that the money would help “provide educational and self-enrichment programs to disadvantaged youth.”

But the foundation, prosecutors said Tuesday, was little more than a conduit for a massive SAT-fixing and college admissions-rigging scheme. And the youth helped by the payment was far from disadvantaged: She was the couple’s elder daughter.

The Justice Department unsealed indictments Tuesday accusing admissions advisers, coaches and school officials of offering wealthy families one of two back doors into the colleges of their choice.

One method involved bribing university officials to pass off applicants as athletic recruits even if they weren’t; the other used brazen cheating on standardized exams. And both schemes had Hollywood stars playing a role.

Huffman’s career in Hollywood stretches back to the 1970s. Her performance as Bree, the transgender main character in “Transamerica,” earned her an Oscar nomination in 2006. But much of her work has been in television. She is best known for roles including Lynette Scavo in “Desperate Housewives” and Dana Whitaker in the Aaron Sorkin show “Sports Night” as well as for several roles in the ABC show “American Crime.” Most recently, Huffman, 56, played Special Agent Clara Dillard in Epix’s “Get Shorty.”

In 1997, she married Macy, the same year he was nominated for an Oscar, after he starred in “Fargo.” Macy, 68, a veteran of many movies, currently plays Frank Gallagher, the head of the dysfunctional family in the Showtime comedy series “Shameless.” They have two daughters: the elder was born in 2000, and the younger two years later.

According to authorities, Mark Singer, the head of a college preparatory business and the founder of the charity, met with Huffman and Macy in their Los Angeles home and explained how he could help them. Singer, who has pleaded guilty and is cooperating with investigators — he is identified as “cooperating witness 1” in the indictments — said he could arrange for their daughter’s SAT proctor to secretly correct her wrong answers and boost her score. “CW-1 has advised investigators that Huffman and her spouse agreed to the plan,” the indictment said.

Following Singer’s instructions, Huffman had her daughter seek permission to get extra time on the SAT, an option available to students with learning disabilities or other needs. Once the girl received the permission, Singer instructed Huffman to have her daughter take the test in December 2017 with a proctor who was in on the scheme. (He is cooperating witness No. 2.)

At first, when it appeared that a different proctor from her daughter’s own high school would be involved, Huffman emailed Singer: “Ruh Ro!” They soon got the plan back on track by using another test site where, according to the indictment, the crooked proctor would be present.

Less than two months ago, Parade published an interview with Macy, in which he spoke of his older daughter’s college search. “We’re right now in the thick of college application time, which is so stressful,” he said. “I am voting that once she gets accepted, she maybe takes a year off.”

However stressful the process was, prosecutors believe the cheating helped his daughter’s cause.

“Ultimately, Huffman’s daughter received a score of 1420 on the SAT, an improvement of approximately 400 points over her PSAT, taken without CW-2 one year earlier,” said the indictment, referring to the Preliminary SAT.

It was unclear if their daughter has been admitted to any colleges, or if she even knew, before Tuesday, about any cheating on her behalf.

The indictment also includes excerpts from a conversation in which Macy, Huffman and Singer discussed repeating the process for the younger daughter, but only after she took the SAT on her own to see how well she would do. If they went through with the plan, Singer explained, the second score could only go up so much or else they would raise suspicions.

Ultimately, Huffman and Macy decided not to proceed with the plan for their younger daughter, the indictment said.

Huffman was charged with conspiracy to commit mail fraud and honest services mail fraud. But Macy, who is referred to in the indictment as her spouse but not by name, was not charged. Neither the indictment nor prosecutors’ statements explained why, though it is possible that prosecutors believed they did not have enough evidence to charge him. In the emails and recorded telephone conversations quoted in the indictment, Macy is a direct participant only in conversations regarding the aborted plan, not the one that was carried to fruition and resulted in the $15,000 payment.

A representative for the couple did not respond to a request for comment. Huffman was arrested Tuesday morning in Los Angeles, according to the U.S. Attorney’s Office in Boston, which is spearheading the prosecution.

Among Huffman’s most recent projects is “When They See Us,” a Netflix series due out this year about the wrongful convictions in the Central Park jogger case, in which she plays Linda Fairstein, one of the prosecutors. Netflix declined to comment.

Another actress who was charged, Lori Loughlin, was making arrangements to surrender. Loughlin, 54, is best known for her role as Aunt Becky on the 1990s sitcom, “Full House,” a role she reprised recently in a reboot, “Fuller House,” which streamed on Netflix.

Her husband, Mossimo Giannulli, also was charged. Giannulli founded the Mossimo fashion brand in 1986. The company sells clothing and accessories around the world, including in Australia, Mexico, Japan and India. It had a partnership with Target that ended in 2017.

Their daughter Olivia Jade Giannulli, a budding social media influencer with close to 2 million YouTube subscribers and 1.3 million Instagram followers, posted two paid advertisements on Instagram that highlighted her identity as a student shortly after having been admitted to the University of Southern California. According to the indictments, she had a lot of help getting in.

Her parents are accused of paying $500,000 to have Olivia and her sister classified as crew recruits for USC despite never having participated in the sport, according to prosecutors. The indictment says $100,000 was in the form of two $50,000 bribes to Donna Heinel, a senior associate athletic director at the USC, who then marked the girls as potential members of the crew team. Heinel also was indicted.

The couple sent the other $400,000 to the foundation — a payment of $200,000 after each daughter received her USC admission letter.

A representative for Loughlin declined to comment.

It was not clear whether either girl knew about any scheme to help them, or what, if anything, USC would do with them now.

In a statement, the school said: “We are aware of the ongoing wide-ranging criminal investigation involving universities nationwide, including USC. USC has not been accused of any wrongdoing and will continue to cooperate fully with the government’s investigation.”

This article originally appeared in The New York Times.