“The Avengers” star Tom Hiddleston will play Hank Williams — and sing the country music icon’s songs — in the independent biopic “I Saw the Light.”

Brett Ratner’s RatPac Entertainment, Bron Studios and Creative Wealth Media Finance are producing and financing. Production is scheduled to begin in October in Louisiana.

Veteran producer Marc Abraham will direct from his own script, which is based on the 1994 book “Hank Williams: The Biography” by Colin Escott, George Merritt and William MacEwen.

Aaron L. Gilbert will produce with Ratner, G. Marq Rosell and Abraham. James Packer, Ratner’s partner in RatPac, will exec produce.

Producers have obtained rights from Sony ATV for Williams’ songs, including “Your Cheatin’ Heart,” “I”m So Lonesome I Could Cry” and “Hey Good Lookin’.”

Williams was born in 1923 in Alabama and broke out in the post-World War II era with the song “Move It on Over.” Among his hits are “Lost Highway,” “Jumbalaya (on the Bayou),” “Ramblin’ Man,” “You Win Again” and “Lovesick Blues.”

He suffered from spina bifida and died at age 29 of heart failure after struggling with alcoholism and addiction to prescription pills.

Hiddleston is best known for his playing Loki in the Marvel movies “Thor,” “The Avengers” and “Thor: The Dark World.” Other credits include “Midnight in Paris” and “War Horse.”

Abraham began developing the project in 2009 while he was partnered in the now-defunct Strike Entertainment with Eric Newman. His other directing credits include “Flash of Genius.”

Hiddleston is represented by Hamilton Hodell, WME, Authentic and Peikoff Mahan Law Office.

Variety sister site Deadline Hollywood first broke the news.