It can often feel like trust in science is a casualty of the “fake news” era. Skepticism of well-established concepts like vaccine safety and climate change is widespread today, with consequences including an unprecedented measles outbreak in the U.S. and an ever-warming environment.

It may be surprising, then, that a new, nationally representative survey of 4,500 adults from the Pew Research Center shows that confidence in scientists is on the upswing. In 2019, 86% of Americans said they had at least a fair amount of confidence that scientists are acting in the public’s best interests. That’s up from 76% in 2016, and beats out reported confidence in elected officials, religious leaders and the media, according to Pew.

“It’s striking to see these findings,” says Cary Funk, Pew’s director of science and society research. “Generally, we would have expected stability.” Prior Pew research that was based on a slightly different survey question—do you have “a great deal of confidence in the people running” various institutions, including scientific institutions—showed that trust has been more or less steady since the 1970s.

Despite the gains, Funk notes that only 35% of respondents reported a “great deal” of confidence in scientists in 2019. Even still, that’s second only to the military in terms of full support, and up from 21% in 2016, the new data show.

Democrats were more likely than Republicans to report confidence in both scientists and their objectivity, and to say that scientists should be involved in policy matters. Americans also reported more trust in the types of scientists with whom they interact regularly—such as dietitians and medical doctors—than in research scientists. People who said they had a good amount of scientific knowledge also tended to report higher trust in scientists.

“Science is a vast enterprise, and what we had seen before is that people’s views about science and scientists can vary,” Funk says.

The report also dug into sources of mistrust in the scientific community. Many respondents expressed concerns about scientists’ conflicts of interest, misconduct, transparency and accountability for mistakes. Better access to original data, independent review of findings and separation between industry and research could boost the public’s trust in science, according to survey responses.

Write to Jamie Ducharme at jamie.ducharme@time.com.