Beverly McGuire saw the warning signs before the town well went dry: sand in the toilet bowl, the sputter of air in the tap, a pump working overtime to no effect. But it still did not prepare her for the night last month when she turned on the tap and discovered the tiny town where she had made her home for 35 years was out of water.

"The day that we ran out of water I turned on my faucet and nothing was there and at that moment I knew the whole of Barnhart was down the tubes," she said, blinking back tears. "I went: 'dear God help us. That was the first thought that came to mind."

Across the south-west, residents of small communities like Barnhart are confronting the reality that something as basic as running water, as unthinking as turning on a tap, can no longer be taken for granted.

Three years of drought, decades of overuse and now the oil industry's outsize demands on water for fracking are running down reservoirs and underground aquifers. And climate change is making things worse.

In Texas alone, about 30 communities could run out of water by the end of the year, according to the Texas Commission on Environmental Quality.

Nearly 15 million people are living under some form of water rationing, barred from freely sprinkling their lawns or refilling their swimming pools. In Barnhart's case, the well appears to have run dry because the water was being extracted for shale gas fracking.

The town — a gas station, a community hall and a taco truck – sits in the midst of the great Texan oil rush, on the eastern edge of the Permian basin.

A few years ago, it seemed like a place on the way out. Now McGuire said she can see nine oil wells from her back porch, and there are dozens of RVs parked outside town, full of oil workers.

But soon after the first frack trucks pulled up two years ago, the well on McGuire's property ran dry.

No-one in Barnhart paid much attention at the time, and McGuire hooked up to the town's central water supply. "Everyone just said: 'too bad'. Well now it's all going dry," McGuire said.

Ranchers dumped most of their herds. Cotton farmers lost up to half their crops. The extra draw down, coupled with drought, made it impossible for local ranchers to feed and water their herds, said Buck Owens. In a good year, Owens used to run 500 cattle and up to 8,000 goats on his 7,689 leased hectares (19,000 acres). Now he's down to a few hundred goats.

The drought undoubtedly took its toll but Owens reserved his anger for the contractors who drilled 104 water wells on his leased land, to supply the oil companies.

Water levels were dropping in his wells because of the vast amounts of water being pumped out of the Edwards-Trinity-Plateau Aquifer, a 34,000 sq mile water bearing formation.

"They are sucking all of the water out of the ground, and there are just hundreds and hundreds of water trucks here every day bringing fresh water out of the wells," Owens said.

Meanwhile, residents in town complained, they were forced to live under water rationing. "I've got dead trees in my yard because I haven't been able to water them," said Glenda Kuykendall. "The state is mandating our water system to conserve water but why?... Getting one oil well fracked takes more water than the entire town can drink or use in a day."

Even as the drought bore down, even as the water levels declined, the oil industry continued to demand water and those with water on their land were willing to sell it. The road west of town was lined with signs advertising "fresh water", where tankers can take on a box-car-sized load of water laced with industrial chemicals.

"If you're going to develop the oil, you've got to have the water," said Larry Baxter, a contractor from the nearby town of Mertzon, who installed two frack tanks on his land earlier this year, hoping to make a business out of his well selling water to oil industry.

By his own estimate, his well could produce enough to fill up 20 or 30 water trucks for the oil industry each day. At $60 (£39.58) a truck, that was $36,000 a month, easily. "I could sell 100 truckloads a day if I was open to it," Baxter said.

He rejected the idea there should be any curbs on selling water during the drought. "People use their water for food and fibre. I choose to use my water to sell to the oil field," he said. "Who's taking advantage? I don't see any difference."

Barnhart remained dry for five days last month before local work crew revived an abandoned railway well and started pumping again. But residents fear it is just a temporary fix and that next time it happens they won't have their own wells to fall back on. "My well is very very close to going dry," said Kuykendall.

So what is a town like Barnhart to do? Fracking is a powerful drain on water supplies. In adjacent Crockett county, fracking accounts for up to 25% of water use, according to the groundwater conservation district. But Katharine Hayhoe, a climate scientist at Texas Tech University in Lubbock, argues fracking is not the only reason Texas is going dry – and nor is the drought. The latest shocks to the water system come after decades of overuse by ranchers, cotton farmers, and fast-growing thirsty cities.

"We have large urban centres sucking water out of west Texas to put on their lands. We have a huge agricultural community, and now we have fracking which is also using water," she said. And then there is climate change.

West Texas has a long history of recurring drought, but under climate change, the south-west has been experiencing record-breaking heatwaves, further drying out the soil and speeding the evaporation of water in lakes and reservoirs. Underground aquifers failed to regenerate. "What happens is that climate change comes on top and in many cases it can be the final straw that breaks the camel's back, but the camel is already overloaded," said Hayhoe.

Other communities across a bone-dry south-west are resorting to extraordinary measures to keep the water flowing. Robert Lee, also in the oil patch, has been hauling in water by tanker. So has Spicewood Beach, a resort town 40 miles from Austin, which has been trucking in water since early 2012.

San Angelo, a city of 100,000, dug a pipeline to an underground water source more than 60 miles away, and sunk half a dozen new wells.

Las Cruces, just across the border from the Texas panhandle in New Mexico, is drilling down 1,000ft in search of water.

But those fixes are way out of reach for small, rural communities. Outside the RV parks for the oil field workers who are just passing through, Barnhart has a population of about 200.

"We barely make enough money to pay our light bill and we're supposed to find $300,000 to drill a water well?" said John Nanny, an official with the town's water supply company.

Last week brought some relief, with rain across the entire state of Texas. Rain gauges in some parts of west Texas registered two inches or more. Some ranchers dared to hope it was the beginning of the end of the drought.

But not Owens, not yet anyway. The underground aquifers needed far more rain to recharge, he said, and it just wasn't raining as hard as it did when he was growing up.

"We've got to get floods. We've got to get a hurricane to move up in our country and just saturate everything to replenish the aquifer," he said. "Because when the water is gone. That's it. We're gone."