MARIANTE, Brazil—For 250 years, traders and farmers toiled away on the banks of the Taquari River in Brazil’s prosperous south, turning this small community into a hub of corn and tobacco production.

But in a matter of days last month, Mariante and its roughly 600 homes were reduced to a pile of muddy rubble, swept off the map with scores of other towns by catastrophic floods that have killed at least 175 people.

More than 650,000 others were evacuated, the country’s biggest displacement on record, according to government figures, and the largest in the Americas as a result of floods in 14 years. Environmentalists say it is a harbinger of disasters to come as climate change uproots ever more families worldwide.

Many in the region never imagined it would be this way.

Brazilians have long joked that theirs is a “blessed country,” free from the hurricanes, volcanoes, earthquakes and other natural disasters that torment the U.S. and other Latin American countries.

But as extreme weather events become more common, Brazilians—who only months ago saw the worst drought in a century devastate parts of the Amazon rainforest—are starting to think that they too are cursed.

“We can’t go back,” said Joice da Silva , who has been living with most of her neighbors in a cramped gymnasium 6 miles from Mariante for the past month.

“This is now Mariante,” da Silva said, pointing to families huddled around her on makeshift beds in the shelter, squeezed between televisions, baby strollers and everything else they could grab before the waters rose.

Few believed that anything like this could happen here in Rio Grande do Sul, an agricultural powerhouse the size of Nevada that has become one of Brazil’s richest and most developed states.

“My son still doesn’t get it,” da Silva said of her 6-year-old boy, who was eating rice from the soup kitchen accompanied by their bewildered pet pinscher. “He keeps asking to go back home to play with his toys, but they’re not there, the house isn’t there. Part of it is dangling from a tree.”

Older children have particularly struggled, volunteer psychologists visiting the government-run shelter said, explaining how some put their hands over their ears in terror every time the rain pummels the gymnasium’s corrugated-iron roof.

By 2050, some 216 million people could face similar situations, forced to migrate within their own countries as a result of flooding, the rise of sea levels, droughts and other effects of climate change, according to recent World Bank estimates.

In the past few months alone, extreme rainfall and deadly floods have also wreaked devastation in Kenya, Afghanistan, China and Australia, as natural weather patterns have been exacerbated by record-breaking global temperatures , scientists say.

Brazil has been hit particularly hard. Some five months of rain fell in just 15 days in Rio Grande do Sul, submerging hundreds of towns as well as parts of the state capital Porto Alegre and its international airport.

President Luiz Inácio Lula da Silva deployed the armed forces, while celebrities and politicians joined the rescue efforts across the state, speeding down streets-turned-rivers in jetskis to rescue stranded residents from the filthy water.

Rio Grande do Sul’s state governor, Eduardo Leite , said last month that cleanup and reconstruction efforts would likely cost at least $3.6 billion. Economists have since estimated it will cost closer to $20 billion to rebuild infrastructure across the vast state, as well as relocate homes and schools to higher ground.

The last time so many people in the Americas were evacuated because of rising waters was in Colombia in 2010, when floods led to 1.5 million internal displacements, according to the Internal Displacement Monitoring Centre, a Geneva-based research group.

This year, it was April 27 when the first storm hit southern Brazil. The region is commonly engulfed by bouts of low pressure trapped between areas of high pressure, prompting heavy rains. But global warming has intensified those weather patterns, with hotter air holding more water—some 7% more for every extra degree Celsius, said Carlos Nobre , a Brazilian climate scientist.

“Global warming means that there is much more humidity in the atmosphere, which makes the rains far, far stronger,” Nobre said.

The first victims were crushed in landslides or electrocuted, but as rivers swelled, people began to drown. By the end of April, the Taquari River, one of the state’s main waterways, was rising by as much as one meter per hour, according to government data, and converging with other overflowing rivers funneling the region’s colossal rainfall down into Porto Alegre.

Some residents took refuge on the second floor of their homes in the belief they would be safe. As the waters kept rising, they ripped away tiles and burrowed through their roofs to get on top of their homes.

While authorities called on residents to evacuate, some refused to leave, concerned over looting by modern-day pirates—bandits on boats—who moved in with the floodwaters to ransack empty houses.

“The future of extreme climate events has arrived,” wrote some of the country’s top scientists in an open letter at the end of May to Brazil’s government.

As the floodwaters have receded over recent days in Mariante and surrounding towns, scenes of utter devastation have emerged from the putrid, dark-orange mud.

Mangled overturned cars and broken farm equipment teeter up against the remains of houses, surrounded by the sodden remnants of their owners’ lives: grimy mattresses and sofas, and splintered kitchen cabinets. In total, the floods created across the state some 47 million tons of garbage that must now be disposed of, according to estimates from the United Nations.

In some cases, wooden houses on the river’s banks, boats still attached to porches, were simply lifted up by the floodwaters and dumped further inland among the carcasses of dead cattle and other debris.

Broken sewage pipes have worsened the foul smell and turned the region’s once-verdant green fields into breeding grounds for dangerous bacteria. Already in the past few weeks, at least 17 people have died from leptospirosis, a bacterial infection often spread through rat urine.

The biggest challenge officials face is housing for the displaced, as authorities take on the gargantuan task of relocating entire towns to higher ground.

Further north, Mateus Trojan, mayor of Muçum, finds himself in the strange job of being in charge of a town that barely exists. When storms hit the town of more than 4,000 people last month, Muçum had been in the process of rebuilding from smaller floods late last year.

Some 80% of Muçum and 900 homes were damaged in flooding since last year, of which 220 were destroyed, he said, adding that 40% of the town has been permanently cordoned off, considered too risky to occupy.

Before this year’s floods, the town council had started buying up land on higher terrain to rehouse residents. The fear now is that families and businesses alike will just abandon the region altogether.

“There is a huge sense of disappointment,” Trojan said, adding that he feared an exodus could plunge the once-prosperous town into poverty.

In other places, officials face the opposite problem: People won’t leave, tempting fate ahead of what they said may be even more devastating floods.

“I can’t see myself living anywhere else,” says Valmir Couto , 54 years old, as he attempted to dry out a previously submerged television using a hairdryer, at his home in a village some 4 miles north of Mariante.

He and his wife, Rosemeri, escaped by boat as the waters rose as high as the rafters of their house, drowning their chickens and a pregnant cow, and carrying off their Chevrolet Corsa somewhere into the forest.

A week later they were back to salvage what was left, Couto explained, as his wife valiantly mopped the floor as muddy water seeped up through the grout.

“Most of our neighbors have left,” he said. “Soon it will be just us.”

Write to Samantha Pearson at samantha.pearson@wsj.com