When the James Webb Space Telescope unfurls itself and travels nearly a million miles away from Earth, the observatory will peer billions of years into the past in search of the universe’s first galaxies and stars.

For cosmologist Chanda Prescod-Weinstein, the $10 billion project has been worth every dollar and every minute of the 25 years it took to develop. “It is a phenomenal instrument,” she said in an interview with The Washington Post. “I am so excited to see baby galaxies.”

But Prescod-Weinstein, who teaches both physics and women’s studies at the University of New Hampshire, fears the telescope’s Dec. 18 scheduled launch is arriving under a cloud. And not the dazzling nebulae of the beyond, but the legacy of the former NASA leader for whom the telescope is named — James Webb. Prescod-Weinstein and other critics argue that Webb was complicit in the discrimination of LGBTQ employees in the ’40s, ‘50s and ‘60s — both as undersecretary in the U.S. Department of State and as the top administrator at NASA.

“It is unfortunate, therefore, that NASA’s current plan is to launch this incredible instrument into space carrying the name of a man whose legacy at best is complicated and at worst reflects complicity in homophobic discrimination in the federal government,” Prescod-Weinstein and three other scientists wrote in a Scientific American article in March.

The scientists — along with hundreds of graduate students, enthusiasts and astronomers — urged NASA to rename the telescope. But following an investigation into Webb’s history, the agency recently announced that the name will stay.

“NASA’s History Office conducted an exhaustive search through currently accessible archives on James Webb and his career,” NASA spokeswoman Karen Fox said in a statement to The Post. “They also talked to experts who previously researched this topic extensively.

“NASA found no evidence at this point that warrants changing the name of the James Webb Space Telescope,” Fox added.

Like NASA, defenders of Webb argue there is no evidence the longtime civil servant played a decisive role in mid-20th century government policies that routinely rooted out gay and lesbian employees and cast them as “moral perverts.” But Webb’s critics say he did not need to spearhead the efforts to be morally responsible. Webb was in a position of power as the discrimination was carried out and seemingly did nothing to stop it, they argue.

At a time when Americans are rethinking who should be represented in monuments and on buildings and street signs, the telescope emerges as a case study of the fractious process of endowing an object with a name.

NASA is not the only federal agency facing questions over naming processes. Congress, following the death of George Floyd, gave the Defense Department three years to change the names of 10 military bases that honor Confederate leaders. A Navy task force also recommended a review of ship and street names that have Confederate ties.

If the James Webb Space Telescope ends up delivering the same kinds of stunning glimpses of the universe the Hubble has produced over the past three decades, it figures not only to be a household name, but also the popular embodiment of scientific discovery and its most wondrous attributes.

“Children are going to grow up with this name on their lips — and with this telescope that is going to define astronomy for a generation, as Hubble did before it,” Prescod-Weinstein told The Post.

Although NASA has decided to keep Webb’s name on the telescope, astronomers continue to debate the former leader’s legacy. As NASA’s chief from 1961 to 1968, Webb is credited for leading the agency through its most storied period: the Apollo missions. Webb retired from the agency in 1968, about a year before Apollo 11 reached the moon, but he is credited for laying the groundwork for that milestone.

That is why Sean O’Keefe, NASA’s administrator from December 2001 to February 2005, decided to name the telescope, which was in its early stages at the time, after Webb. The decision, O’Keefe recently told NPR, came out of conversations with others at NASA. “There was no appointed group of commissioners to come up with a name,” although everyone at the time seemed to like the idea, O’Keefe told the public radio network.

But around 2015, Webb’s legacy came under scrutiny. Critics alleged that he was active in the Lavender Scare, a movement lasting from the late ’40s to the ’60s that led to thousands of LGBTQ employees being purged from the federal workforce. Webb’s critics cited since-edited Wikipedia entries, one of which quoted him stating in a report: “It is generally believed that those who engage in overt acts of perversion lack the emotional stability of normal persons.”

The history is not so clear-cut. Earlier this year, astrophysicist Hakeem Oluseyi penned an article presenting evidence that Webb did not write the line or the report. The quote, he discovered, came from a 1950 Senate committee report.

Citing other examples, Oluseyi argued that there was little to no evidence that Webb was an active participant in the Lavender Scare.

“The community of astronomers and astrophysicists in the online social media group who blindly accepted the allegations also piled on and were ready to confront NASA although they did not apply proper rigor,” he wrote.

Oluseyi wrote in his article that he found evidence that Webb was active in hiring Black employees and racially integrating NASA facilities in the ‘60s.

Moreover, David K. Johnson, who wrote a book titled “The Lavender Scare,” told Nature in July that he knew of no evidence that Webb played a lead role in the movement.

Webb’s critics argue that he knew about the systemic discrimination and did nothing. “There is no record of him choosing to stand up for the humanity of those being persecuted,” Prescod-Weinstein and her colleagues wrote in March.

In arguing for Webb’s complicity, critics point to several pieces of evidence. Records in the National Archives show that Webb received a memorandum from a fellow leader that outlined “the problem of homosexuals and sex perverts in the Department of State,” as well as the agency’s participation in a Senate inquiry that ultimately determined that LGBTQ workers were “security risks” and “unsuitable” for government roles. Moreover, records show, Webb passed that memorandum to a senator during a June 1950 meeting.

Webb’s critics also cite the case of Clifford Norton, a NASA budget analyst who was arrested in Washington’s Lafayette Square in October 1963 after being accused of making sexual advances toward another man. The agency quickly found out and fired Norton, deeming his suspected sexual advance “immoral, indecent, and disgraceful conduct.” It would have been difficult for Webb not to know about Norton’s firing, critics argue.

Years later, the District’s federal court of appeals ruled the firing was unlawful.

NASA’s acting chief historian, Brian Odom, examined both Norton’s firing and the State Department memos during NASA’s investigation into Webb, which began in March and concluded several weeks ago. Odom said NASA found no evidence that Webb initiated Norton’s firing or knew about it. And although the memos Webb received and passed to a senator in 1950 were “critically important” to the investigation, the documents did not provide enough information about Webb’s role in the Lavender Scare, Odom said.

“Definitely they’re a starting place. Definitely they’re important,” Odom said about the memos. “But they just don’t give you enough. They don’t give you enough about the individual.”

Beyond the memos, Odom said, there was no documentation that proved Webb played a role in LGBTQ discrimination in the federal government.

But Erich Matthes, a philosophy professor at Wellesley College and author of the forthcoming book “Drawing the Line: What to Do With the Work of Immoral Artists From Museums to the Movies,” said that smoking-gun evidence may not be necessary to conclude that Webb was morally responsible. It would be “particularly bad” if a piece of evidence showed Webb directly orchestrated the firings of LGBTQ employees. But there are other forms of moral responsibility, he told The Post. Namely: complicity.

“Even if we wanted to say that he didn’t know about what was going on — which, based on my understanding of the case, seems unlikely … he ought to have known what was going on,” Matthes said, adding that, in his opinion, that could make Webb morally responsible.

Erin Thompson, a professor of art crime at the John Jay College of Criminal Justice at City University of New York, said that it seemed Webb was “deeply complicit in what was the standard of the time.”

Thompson, who wrote the forthcoming book “Smashing Statues: The Rise and Fall of America’s Public Monuments,” said she has heard arguments that Webb’s acceptance of the systemic discrimination was morally acceptable because of the time period. “But the thing is,” Thompson said, “that time is not now.”

Thompson and Matthes agreed that naming objects after people is fundamentally flawed — because people are flawed.

“If the goal is to express commitment to a certain value or certain ideal by naming something after a particular person that you see as embodying those values or ideals, you could just skip the person and go straight to the ideal,” Matthes said.

He noted that NASA has a long history of doing exactly that, citing Mars rovers named Curiosity and Perseverance.

LGBTQ groups, including the Human Rights Campaign and GLAAD, have recognized Webb’s history as complicated and say there are better names for the telescope. Both told The Post that Sally Ride, the first American woman in space — and the first lesbian in space — would be a better namesake for the telescope.

“When considering how we represent the best of what NASA — an organization with a legacy of inspiring people around the world to look above and dream of something better — is and has to offer, we must recognize that there is power in naming things so that they best reflect our values,” Laurel Powell, a Human Rights Campaign spokeswoman, said in an email.

Adrian Lucy, an astronomer at Columbia University who recently called attention to the 1950s-era memorandums pertaining to Webb, acknowledged that the scientific community may never agree on the former NASA administrator’s legacy.

“We can argue forever … about Webb’s motivations, goals, or tactics, about the complexities of moral responsibility, about whatever,” Lucy said. But “at the end of the day [the James Webb Space Telescope] needs a name that hurts less.”