Didn't see this one coming: TMZ is reporting that actor Gerard Butler was being treated for substance abuse and at the Betty Ford Center in California until today.

According to the site, Butler's problems began during the production of 300 back in 2006, as his role in the film was very physically demanding. He began to struggle with pain management, and his condition was exacerbated recently when he injured himself in December while filming Of Men and Mavericks.

Butler checked himself into the rehab facility three weeks ago when he realized that his reliance on prescription pills to aid with the pain could easily become a full-blown addiction. Additionally, he was being treated for problems with cocaine use.

He was released earlier today after completing the program. A spokesperson for the actor told People that Butler "completed a successful course of treatment," and "has returned home in good health."

[via TMZ]