US actor Ben Affleck has thanked his family after completing a stay in rehab for alcohol addiction.
The Oscar-winner wrote on Instagram that he had spent 40 days at a treatment centre, and was still in outpatient care.
"The support I have received from my family, colleagues and fans means more to me than I can say," his post read.
"It's given me the strength and support to speak about my illness with others."
Affleck was pictured looking bedraggled in August while being driven to rehab by his ex-wife, Jennifer Garner.
The Dallas Buyers Club actress filed for divorce in April 2017, but the former couple remain close and have three children together.
TMZ reported that Garner "staged an intervention" after seeing photos of her ex-husband getting an alcohol delivery outside his home.
The Batman star's latest spell in rehab is his third, following stints in 2001 and 2017.
"Battling any addiction is a lifelong and difficult struggle," he wrote on Instagram. "I am fighting for myself and my family."
The actor specifically thanked people who have "reached out on social media" to share their own addiction journeys, saying: "Your strength is inspiring and is supporting me in ways I didn't think was possible."
He added that seeking help for addiction is "a sign of courage, not weakness or failure", and said he hoped that further down the road, he too could "offer an example to others who are struggling".