American artists Andy Warhol, Norman Rockwell and Annie Leibovitz have all contributed to the vast art collection of . . . the National Aeronautics and Space Administration?

Visitors to the National Air and Space Museum might be surprised to learn the origin of the more than 70 photos, paintings and sculptures on display in the new exhibition “NASA/Art: 50 Years of Exploration.”

NASA started commissioning works of art inspired by the space program in 1962, shortly after its inception in 1958. The agency has about 3,000 pieces.

But budget tightening has left NASA’s art program in “a lull,” program curator Bert Ulrich said.

“We had a zero budget last year, and this year’s not looking good either,” he said, adding that the program endures nonetheless.

Artists get a $2,500 commission from NASA for their work — peanuts compared with what most would normally earn.

“That’s the beauty of the program,” Ulrich said. “The artists that work with us are so inspired by NASA that they are very generous.”

In return, NASA gives them special access to meet astronauts and learn about the agency.

When Rockwell produced his 1965 oil painting of astronauts John Young and Gus Grissom, he borrowed a Gemini spacesuit to ensure the work’s accuracy. (His commission was $800.) Tina York studied fluid dynamics at NASA’s Ames Research Center in California to create her 1995 mixed-media piece. Both are on display in the Air and Space Museum exhibit, which runs through Oct. 9.

James Webb, NASA’s second administrator, started the art program and tapped NASA staffer James Dean as its founding director.

Asif Siddiqi, an associate professor at Fordham University who specializes in the history of science and technology, said NASA’s art program gave space exploration a kind of visual aesthetic and the public a sense of the possibilities of the space program.

“A generation of people who grew up, especially in the 1960s and 1970s, still associate that particular aesthetic with the space program,” he said.

Many federal agencies have art collections. The Senate maintains portraits of past members, in addition to mirrors, chairs, paintings, and historical prints and engravings. The Federal Reserve Board established its art program in the mid-1970s in response to President Richard Nixon’s call for the government to support the arts. The Fed has more than 400 works of donated art, including an 1890s oil painting by Victor Dubreuil of barrels overflowing with money.

The Postal Service has about 1,200 murals and 300 sculptures that were created for post offices from 1934 to 1943 as part of President Franklin D. Roosevelt’s New Deal, according to Dallan Wordekemper, the Postal Service’s federal preservation officer.

“Postal employees are proud of the art collection, and the public finds it beautiful, inspiring and appreciates its historic significance,” he said.

Ulrich has a photographer in mind to shoot NASA’s final shuttle mission on July 8, but the work probably will be donated, rather than commissioned.

“Artwork’s not going to be a priority for the agency right now, and that’s understandable,” Ulrich said. “The great thing is we have a collection now that we can look back at.”