Ben Affleck revealed, in a Facebook post on Tuesday, that he recently completed a stint in rehab for alcohol addiction.

“I have completed treatment for alcohol addiction; something I’ve dealt with in the past and will continue to confront,” he wrote on Facebook. Affleck checked himself into rehab in 2001 as well.

“I want to live life to the fullest and be the best father I can be. I want my kids to know there is no shame in getting help when you need it, and to be a source of strength for anyone out there who needs help but is afraid to take the first step,” he continued. “I’m lucky to have the love of my family and friends, including my co-parent, Jen, who has supported me and cared for our kids as I’ve done the work I set out to do. This was the first of many steps being taken towards a positive recovery.”

In the Facebook post, Affleck said he’s “lucky to have the love of … co-parent, Jen.” He and wife Jennifer Garner separated in 2015, but have not formally divorced yet. The two have three children together: two daughters and one son. Affleck recently exited as director of the Batman standalone film, but will still star in and produce the highly-anticipated superhero tentpole. Matt Reeves has since taken over directing duties.

Affleck’s last directorial effort, the gangster pic “Live by Night,” flopped, leaving Warner Bros. — the studio behind the period film — with a $75 million loss.

Syfy also recently canceled the sci-fi thriller “Incorporated,” which Affleck executive produced with longtime friend and business partner Matt Damon and Jennifer Todd.

Before he dons the cape and cowl in “The Batman,” the actor will next play the Dark Knight in “Justice League,” which hits theaters on Nov. 17.

POPULAR ON VARIETY: