Jennifer Garner and Ben Affleck announced their separation in 2015, but it took them three years to finalize their divorce. The real reason for their decision has finally be revealed.

Two years after their separation, the “Alias” star said that she’s not happy with what happened to her marriage. She said that she wouldn’t have chosen to go the separation route if it was only up to her. However, the actress also had to take the welfare of her children into consideration.

A source told Us Weekly that even though Garner didn’t want to divorce Affleck, she was left with no option because the “Batman v Superman” star was struggling with his alcohol addiction.

But even after they separated, Garner and Affleck didn’t finalize their divorce until last year. The source said that Garner wanted to make sure that her ex-husband was in a stable state when their marriage legally ends.

“Jen wanted to give Ben the time and opportunity to work on his health and sobriety. She isn’t in a rush… Jen just isn’t willing to settle the custody issues until she’s 100 percent certain that he’s clean… She’ll wait for him to prove he is taking it very seriously,” the source said.

Last year, Affleck checked into rehab to seek treatment for his addiction after Garner’s intervention. Shortly after, Affleck was spotted out in public after completing a 40-day treatment. His and Garner’s custody battle has also been settled.

Today, Affleck and Garner have an amicable relationship with each other. In fact, the couple regularly spends time with each other for the sake of their kids. On Sundays, they attend church service in Los Angeles as a family.

And on Independence Day, Affleck bonded with two of his three children for the parade. Garner and her teen daughter, Violet, skipped the festivities because they were in London. Garner and Violet watched a play while they are on their short vacation.

Jennifer Garner and Ben Affleck
Pictured: Actress Jennifer Garner and actor-director Ben Affleck arrive at the Oscars at Hollywood & Highland Center on February 24, 2013 in Hollywood, California. Getty Images/Jason Merritt