SAN FRANCISCO—Anxiety among Earth and climate scientists has been mounting for weeks. The election of Donald J. Trump as U.S. president, a candidate who called human-driven climate change a hoax, was followed by Trump naming more and more climate-change doubters to run the government’s environment and energy agencies. So this Wednesday a throng of about 2,000 researchers packed a hall at the American Geophysical Union’s (AGU) annual meeting here to hear from politicians and leading scientists about whether science is about to be thrown out the window. Along with, possibly, their jobs.

“I was definitely given a gut check this past week,” said a worried scientist from Los Alamos National Laboratory in New Mexico, which is part of the Department of Energy (DoE).

But when California Gov. Jerry Brown strode to the microphone and delivered an animated pep talk the crowd’s mood rapidly changed. “We have the scientists, we have the lawyers and we are ready to fight!” Brown said, to loud cheers. “And California is no stranger to this fight. Our emission standards, our energy rules, drove U.S. policy. Whatever Washington thinks it is doing, California is the future.”

Brown urged scientists to take the long view. “This is not one battle. This is a long slog,” he said. One election and a presidential term does not set policy forever, he noted. Scientists, he said to more cheers, are truth-tellers and truth-seekers. “I’ve been doing this a long time,” he said, “and eventually the truth will prevail.” In fact, he added, the election should energize the research community in a needed way. A lot of scientists and policy makers may have been quietly pushing for actions to combat warming, he said, but not pushing very hard. “You know that sometimes you need a heart attack to stop smoking?” he asked. “Well, maybe we just got our heart attack.”

A lot of scientists were fearful because the Trump transition team has asked the DoE for names of employees who worked on climate research and were members of certain science groups. On Tuesday the department said it would not reply to a list of 74 questions designed to root out such information. Brown told the crowd that his state would brook no political interference in the research done at the many national labs operated by the University of California.

Alexandra Shultz, the AGU’s public affairs director, told the audience that there are opportunities to advance climate science in the new Congress. “We do have a great deal of bipartisan legislative support,” she said. She specifically named Rep. John Culberson, a Republican congressman from Texas, who chairs the House Subcommittee on Commerce, Justice, Science and Related Agencies, which oversees NASA, the National Science Foundation and related agencies. Culberson, she said, supported science funding. He has agreed that humans are affecting climate, although he questions the degree.

Other opportunities can be seen with some Trump nominees, said scientist Daniel Kammen, who runs the energy and resources group at the University of California, Berkeley’s Goldman School of Public Policy. Rick Perry, named to head the DoE, was a big supporter of wind energy development when he was governor of Texas, Kammen said. And Rex Tillerson, the ExxonMobil chief nominated as secretary of state, has supported the idea of putting a price on carbon emissions. (Kammen did emphasize that he thinks Tillerson has too many conflicts of interests to serve, however.)

A cautionary note came from the AGU’s president-elect, Eric Davidson of the University of Maryland’s Center for Environmental Science. “It is great to know California has our backs,” he said. “But we need support from all 435 House districts and 100 senators” across the entire country, he continued. The Geophysical Union will be a force for what he called “safe places for science,” free from all forms of harassment. “But we have to work at building bridges,” he said.