And Felicity Huffman helped her through the "pure torture."

During Felicity Huffman's recent court appearance, her legal team submitted more than two dozen letters of support in hopes that the judge overseeing her involvement in the college admissions scandal would offer a more lenient sentence later this month. One of those letters was written by Huffman's Desperate Housewives co-stars, Eva Longoria, and it outlined a situation that she described as "pure torture." During her run on the show, Longoria described a situation in which she was bullied by a coworker. Huffman was the one that stood up for her and stopped the situation before it got worse.

Entertainment Weekly reports that Longoria explained the situation in her letter of support and called Huffman a "good friend." The two of them worked "every day, of every week for nearly 15 hours a day," CNN notes. Longoria added that when she was cast on the show, she was new to the industry and Huffman was the first to embrace her and welcome her.

Credit: LISA O'CONNOR/Getty Images

"When I began the TV show, I was very new to the business and industry as a whole," Longoria wrote. "Felicity was the first one to take me under her wing. From the first table read of the script, she noticed me sitting alone, scared and unsure of where to go and what to do. Her gentle character and kind heart immediately opened up to me."

Part of that friendship involved a bullying incident, which was also described in the letter. Longoria said that she would not have been able to survive the show's decade-long run without Huffman there beside her.

"There was a time I was being bullied at work by a co-worker," Longoria noted, though she did not specifically name the costar who was bullying her. "I dreaded the days I had to work with that person because it was pure torture. Until one day, Felicity told the bully 'enough' and it all stopped. Felicity could feel that I was riddled with anxiety even though I never complained or mentioned the abuse to anyone."

In addition to bullying, Longoria explained that Huffman also helped her earn pay parity. When the show started, Longoria was the lowest-paid of the four main actors. So, when it came time for contract negotiations, Longoria said that Huffman suggested they negotiate together.

"Felicity brought up that we should negotiate together, something we call favored nations that means we all make the same. This meant that my salary would significantly increase and I would be on par with the more experienced actors," she wrote. "Well needless to say, that did not go over too well with the others. But Felicity stood up for me, saying it was fair because the success of the show depended on all of us, not one of us."

During Friday's court appearance, the U.S. government requested that Huffman be sentenced to "a month of prison followed by a year of supervised release and pay a $20,000 fine." CNN adds that Longoria's letter of support, along with similar filings from Huffman's husband, William H. Macy, is meant to showcase the positive aspects of Huffman's character. Huffman's legal team requested that she receive a year term of probation and 250 hours of community service in addition to paying a $20,000 fine.