WASHINGTON — Thousands of scientists and their supporters, feeling increasingly threatened by the policies of President Trump, gathered Saturday in Washington under rainy skies for what they called the March for Science, abandoning a tradition of keeping the sciences out of politics and calling on the public to stand up for scientific enterprise. As the marchers trekked shoulder-to-shoulder toward the Capitol, the street echoed with their calls: “Save the E.P.A.” and “Save the N.I.H.” as well as their chants celebrating science, “Who run the world? Nerds,” and “If you like beer, thank yeast and scientists!” Some carried signs that showed rising oceans and polar bears in peril and faces of famous scientists like Mae Jemison, Rosalind Franklin and Marie Curie, and others touted a checklist of the diseases Americans no longer get thanks to vaccines. Although drizzle may have washed away the words on some signs, they aimed to deliver the message that science needs the public’s support. “Science is a very human thing,” said Ashlea Morgan, a doctoral student in neurobiology at Columbia University. “The march is allowing the public to know that this is what science is, and it’s letting our legislators know that science is vitally important.” The demonstration in Washington — which started with teach-ins and a rally that packed the National Mall — was echoed by protests in hundreds of cities across the United States and around the world, including marches in Europe and Asia. The March for Science evolved from a social media campaign into an effort to get people onto the streets. Its organizers were motivated by Mr. Trump, who as a presidential candidate disparaged climate change as a hoax and cast suspicions on the safety of vaccines. Their resolve deepened, they said, when the president appointed cabinet members who seemed hostile to the sciences. He also proposed a budget with severe cuts for agencies like the National Institutes of Health — which would lose 18 percent of their funding in his blueprint — and the Environmental Protection Agency, which faces a 31 percent budget cut and the elimination of a quarter of the agency’s 15,000 employees. While traveling by motorcade to Walter Reed National Military Medical Center on Saturday, Mr. Trump passed dozens of demonstrators from the march holding signs, including one that said, “Stop denying the earth is dying,” according to a pool report. Later, the White House released a statement from Mr. Trump for Earth Day that did not mention the March for Science by name, but appeared directed at its participants. Calling science critical to economic growth and environmental protection, he said, “My administration is committed to advancing scientific research that leads to a better understanding of our environment and of environmental risks.” Editors’ Picks 5 Workouts for Better MobilityCan Coffee Really Boost Your Mood?The Battle That Raged Under the Vietnam War “As we do so, we should remember that rigorous science depends not on ideology, but on a spirit of honest inquiry and robust debate,” he added. Organizers said they hoped the day’s demonstrations result in sustained, coordinated action aimed at persuading elected officials to adopt policies consistent with the scientific consensus on climate change, vaccines and other issues. “This has been a living laboratory as scientists and science institutions are willing to take a step outside their comfort zone, outside of the labs and into the public spheres,” said Beka Economopoulos, a founder of the pop-up Natural History Museum and an organizer of the march. Mona Hanna-Attisha, a pediatrician who helped expose lead poisoning in Flint, Mich., and who spoke in Washington, called the protest the beginning of a movement to ensure that governments do not dismiss or deny science. “If we want to prevent future Flints, we need to embrace what we’ve learned and how far we’ve come in terms of science and technology,” Dr. Hanna-Attisha said in an interview. What began as a movement by scientists for scientists has drawn in many science enthusiasts, young and old. William Harrison, 9, from Washington, held up a waterlogged cardboard sign he drew with markers of a shark pleading with humanity to save him from global warming. He said science is important because without it, “we basically will not exist.” On the West Coast, Penelope DeVries, 69, carried a sign at the march in San Francisco that said, “Love your mother,” with a blue and green Earth, the paint still wet from when she made it on her kitchen floor. “I have three grandchildren, and I want them to have a beautiful life like I have,” she said. She was one of thousands of upbeat demonstrators who marched through the city’s downtown under mild weather. A volunteer at that march, Bryan Dunyak, 28, was motivated to help improve science outreach and improve public understanding of science. “The vast majority of people will never have the chance to ask a scientist, ‘Why do you do what you do?’” said Dr. Dunyak, who is a postdoctoral researcher in neurodegenerative disease at the University of California, San Francisco. Fearing that Mr. Trump may undermine public support for the sciences, many scientists at the marches said they believed now was the appropriate moment to express themselves politically. “I can’t think of a time where scientists felt the enterprise of science was being threatened in the way scientists feel now,” Naomi Oreskes, a professor of the history of science at Harvard University, said in an interview this week. Dr. Oreskes said the closest parallel to Saturday’s protests were the demonstrations for nuclear disarmament in the 1950s and ’60s. But scientists were then marching against the use of science to build weapons of mass destruction. Thousands converged on the Boston Common in a cold rain, and children danced to a brass band. Students from Harvard and M.I.T. marched over the bridge from Cambridge, and a contingent from Boston University chanted, “What do we want? Science! When do we want it? After peer review!” In a city and state where many work in hospitals and biomedical firms, Mr. Trump’s proposals