Anna Faris and Chris Pratt announced in August that they were legally separating after eight years of marriage. In her new biography, titled Unqualified, the House Bunny actress revealed how she first got together with her ex-husband.

In the tell-all, the 40-year-old star detailed the story about her doomed first marriage with her first husband, Ben Indra, and how she wanted to have an affair with Pratt while she was still in her previous commitment.

In an excerpt of the book obtained by the Daily Mail, Faris admitted that she “desperately” wanted to “f**k” Pratt while she was still married to Indra. The estranged couple, who tied the knot in 2004, was married for three years before calling it quits. The What’s Your Number actress wrote that they later realized that neither of them “were happy in the relationship” and that there were “many red flags.”

Faris shared she and Pratt developed a close friendship while filming Take Me Home Tonight in 2007. Knowing that Faris was married at the time, Pratt tried not to sleep with her and instead hooked up with “background actresses,” causing Faris to feel jealous.

The nail in the coffin to Faris’ marriage with Indra was one night the cast went on a night out.

“I ended up going home early, but everyone else – including Ben – went to a club, and he came crawling home from his wild night out at about 7 a.m.,” Faris recalled.

I’m unqualified to be giving you advice, but I’m doing it anyway in my new book, available for pre-order at all retailers. A post shared by Anna Faris (@annafaris) on Sep 27, 2017 at 12:05pm PDT

It was her co-star Topher Grace who brought Faris to her senses and made her decide that it was finally time to let go. She described the moment as “such a wonderful cold splash of water in the face.”

Soon after she left Indra, Faris and Pratt began dating, describing her relationship as “hot and heavy in a way that I’d never experienced before.”

Anna Faris and Chris Pratt got married in 2009 in Bali. In 2012, they welcomed the birth of their son, Jack. Despite parting ways in August, the exes remain in good terms.

The prologue to Unqualified was written by Pratt, where he calls Faris an “important part of my life and she always will be.”

The Guardians of the Galaxy actor had nothing but kind words for Anna Faris when asked about his thoughts on her first public appearance post-split.

“I know she did great. Anna did an amazing job, man. She rules. Her and Allison [Janney] they both looked great. Go watch Mom on CBS,” Pratt told TMZ.

Anna Faris’ Unqualified will be released on October 24.

[Featured Image by Matt Winkelmeyer/Getty Images]