California’s crushing five-year drought came to a welcome end after record rain three winters ago. Or did it?

Although forests are greener, reservoirs are fuller and widespread water restrictions are gone, many believe the past few years, in which there was pretty decent rainfall, were just a blip on a troubling long-term skid into drier times.

A group of scientists now says that the American West, including California, has been in the midst of a prolonged drought since the beginning of the century — one on par with only four mega-droughts experienced over the past 1,200 years and one capable of causing major social upheaval.

The last mega-drought that the researchers describe, between 1575 and 1593, is believed to have forced Native Americans to relocate whole communities from sprawling mesas to lower river valleys in search of water. The mega-drought before that, in the 1200s, is thought to have contributed to the fall of the cliff-dwelling Anasazi civilization in the Southwest.

“The past two decades look a lot like how the biggest mega-droughts of the past millennium developed,” said Park Williams, bioclimatologist at Co lumbia University’s Lamont-Doherty Earth Observatory and lead author of the study published Thursday in the journal Science. “These mega-droughts are not like anything we’ve seen in recent centuries. They’re viewed as mythical beasts. There’s nothing that’s come even close to them.”

The fear is that if current dry times continue, which the paper’s authors say is more likely than not, the modern era soon will be in the grip of its first mega-drought.

Though society is better equipped to handle a sustained period of dryness, Williams said, with dams and other technologies to boost water supplies and massive delivery systems to share water, there are also more people and more demand today.

Big cities are poised to face water shortages, farms may be unable to plant crops, forests will brown up and be susceptible to pests, and the risk of wildfire will grow.

“We may be getting closer to the point where we can’t tolerate more drought intensity,” Williams said.

Williams and his colleagues at Columbia University, the University of Colorado at Boulder and the University of Idaho drew their conclusions by looking at soil moisture levels across nine states and northern Mexico between A.D. 800 and 2018. In the absence of soil data, they used tree rings from thousands of trees — some analyzed in prior studies and some evaluated for the first time — to model what soil conditions would have looked like in the past.

The researchers found that 40 prolonged droughts occurred over the 1,200-year span, four of which they identified as mega-droughts because soil moisture was far less and the dry periods ran much longer — lasting decades. The monster dry spells emerged in the late 800s, the mid-1100s, the 1200s and the late 1500s.

The team then compared the moisture levels from the four mega-droughts with moisture levels during the first 19 years of this century. They found that the current era is off to a worse start than three of four of the mega-droughts. Only the drought in the late 1500s was drier.

The current dry period also is far broader geographically than any of the previous mega-droughts, stretching from Oregon east to Montana and south to California and New Mexico.

The reason for the present dryness, the researchers say, is largely human-caused climate change. Whereas in past dry spells, the natural variability of weather — what Williams calls “bad luck” — drove the mega-droughts, he and his colleagues marshaled 31 studies on the effects of global warming and concluded that rising temperatures were responsible for about 47% of the aridity today.

“People who keep plants indoors or dry clothes on a line know that when the temperature is hotter, things dry out faster,” he said.

Williams also said that with climate change in play, it becomes that much harder to avoid or emerge from a protracted dry period.

“There’s a lot of inertia here,” he said. “It’s going to require more and more good luck to break out of droughts like this.”

Mega-droughts look different in different places and don’t necessarily mean there aren’t bouts of significant rainfall during their run. California’s wet winter of 2016-17 is an example of a break from an otherwise extraordinarily dry couple of decades, the researchers say. California and much of the West get most of their precipitation in the wintertime.

This past rainy season in Northern California tracked on the dry side. Despite late-season storms, many areas, including San Francisco, have received 50% or less of the average rainfall. The U.S. Drought Monitor, which measures short-term dryness, estimates that 36% of the state is experiencing moderate drought conditions.

Daniel Swain, a climate scientist at UCLA who did not contribute to the new study, said it makes sense that Western states may be plunging into a drought comparable to some of the worst in 12 centuries.

What Swain calls “weather whiplash,” the large swings between wet and dry years at the hands of climate change, is occurring against a backdrop of rising temperatures and shows little sign of abating. The presence of stormy periods, he said, can make it appear as though there is no drought even as heat continues to sap moisture from the atmosphere.

“If it’s still raining sometimes, but it’s warmer, I’m not sure that we as individuals notice (the drying) as much,” he said. “It does sort of change our experience of what drought is, and it makes it harder for us to perceive.”

Kurtis Alexander is a San Francisco Chronicle staff writer. Email: kalexander@sfchronicle.com Twitter: @kurtisalexander