Kevin Costner has joined Taraji P. Henson and Octavia Spencer in the Fox 2000 drama “Hidden Figures.”

“St. Vincent” director Ted Melfi is attached to helm and produce the film along with Chernin Entertainment and Donna Gigliotti of Levantine Films.

The story centers on Johnson (Henson), a brilliant African-American mathematician who, along with her colleagues Dorothy Vaughn and Mary Jackson, served as the brains behind one of the greatest operations in U.S. history — the momentous launch of astronaut John Glenn into orbit, and his safe return. Glenn flew the Friendship 7 mission in 1962 and became the first American to orbit the Earth.

The three women crossed all gender, race and professional boundaries by embarking on the mission.

Costner will play the head of the space program.

The film is adapted from Margot Lee Shetterly’s book “Hidden Figures: The Story of the African-American Women Who Helped Win the Space Race,” which will be published in September by HarperCollins.

The movie will reunite Costner and Spencer, who recently appeared together in “Black or White,” which earned both actors critical accolades for their performances.

Popular on Variety

Costner can next be seen opposite Tommy Lee Jones in the thriller “Criminal.”

He is repped by WME, attorney Ryan Nord and Rod Lake.