AUBURN, Ala. (AP) — An Alabama author who struck up a relationship with Neil Armstrong nearly two decades ago is behind a new movie about the first person to walk on the moon.

The best-selling biography "First Man: The Life of Neil A. Armstrong" by Auburn University professor emeritus James Hansen has been made into "First Man," which debuted recently at the Venice Film Festival.

Hansen said his relationship with the late Apollo 11 astronaut began after he wrote a letter to the famously private Armstrong at the urging of students in 1999. The astronaut responded to the letter, to Hansen's surprise.

Hansen later spent hours interviewing Armstrong as he wrote the only authorized biography of the astronaut.

"After the book was done, the nicest compliment he gave me was, 'Jim, you wrote exactly the book you told me you were going to write.' For him, that was a big deal, because so many people in his life after Apollo 11 would say one thing and actually do another, try to manipulate things to their advantage," Hansen said in a release from Auburn.

Hansen's success in securing Armstrong's cooperation wasn't just luck. Hansen had a reputation in the space community since NASA had submitted a Pulitzer Prize nomination for his 1995 book "Spaceflight Revolution" about the early years of the space agency's Langley Research Center in Hampton, Virginia.

Armstrong died in 2012, which was 43 years after he commanded the Apollo 11 mission and first stepped on the moon on July 20, 1969. Some conservatives have complained that the movie fails to portray when Armstrong and fellow astronaut Buzz Aldrin unfurled a U.S. flag on the lunar surface, but Hansen and Armstrong's sons deny the film is "anti-American."

"This story is human and it is universal. Of course, it celebrates an America achievement. It also celebrates an achievement 'for all mankind,'" Hansen and the Armstrongs said in a statement.

"First Man" is set for wide release by Universal Pictures on Oct. 12. Hansen is a co-producer of "First Man," which was directed by Damien Chazelle of "La La Land."