Felicity Huffman's alleged involvement in a school admissions scheme appears to have been foretold in an episode of "Desperate Housewives."

The Academy Award-nominated actress made headlines Tuesday after she and fellow actress Lori Loughlin were charged with fraud and conspiracy along with dozens of others in a scam that, according to federal prosecutors, saw wealthy parents pay bribes to get their children into the nation’s top colleges.

Felicity Huffman and William H. Macy wed in 1997.  Huffman and Lori Loughlin were charged along with nearly 50 other people Tuesday, March 12, 2019.

Felicity Huffman and William H. Macy wed in 1997.  Huffman and Lori Loughlin were charged along with nearly 50 other people Tuesday, March 12, 2019. (AP)

Huffman’s character on the ABC television series “Desperate Housewives” did something similar to what she’s accused of in the fifth episode of the series’ first season.

In the episode, Huffman's character Lynette Scavo discusses with her husband Tom how their twin sons would get into an elite private school. The two decide they would have to make a contribution to the school in order for them to get in. BuzzFeed was the first to report on the coincidence.

FELICITY HUFFMAN’S HUSBAND WILLIAM H. MACY TURNS 69 AFTER ACTRESS’ ARREST IN COLLEGE ADMISSIONS SCANDAL

“A generous donation will ensure our kids beat ’em out,” Lynette told Tom.

“How much?” Tom asked his wife.

“$15,000,” she replied.

The fictitious couple come up with the money after they sell Tom's boat.

OLIVIA MUNN SLAMS LORI LOUGHLIN, FELICITY HUFFMAN OVER COLLEGE ADMISSIONS SCANDAL: IT ‘WASN’T FOR LOVE’

Huffman, 56, is accused of paying $15,000 disguised as a charitable donation so her daughter could take part in an apparently rigged college entrance-exam. Court documents stated that a cooperating witness met with Huffman and her husband, actor William H. Macy, at their Los Angeles home and explained to them that he "controlled" a testing center and could have someone secretly alter her daughter's answers. The person told investigators the couple agreed to the plan.

Huffman was arrested Tuesday before being released on $250,000 bond. Macy has not been charged.

Fox News’ Sasha Savitsky, Julius Young, Mariah Haas and the Associated Press contributed to this report.