“The houses in the village swarmed with vermin; bats in the thatch; fire ants (formiga de fogo) under the floors; cockroaches and spiders on the walls,” he wrote.

Despite such misgivings, this place grew on Bates, who would let his mind wander on Alter’s beaches after conducting research in the surrounding forest into animal mimicry that supported Charles Darwin’s theory of evolution.

“The soft pale light,” Bates wrote in “The Naturalist on the River Amazons,” “resting on broad sandy beaches and palm-thatched huts, reproduced the effect of a midwinter scene in the cold north when a coating of snow lies on the landscape.”

Winter wasn’t the first thing that popped into my mind when I explored sun-drenched Alter on foot.

In the heat, people wore the same beach fashions, from bikinis to boardshorts, that prevailed in Rio. The leafy plaza had a mellow vibe with vendors offering bowls of the deep-purple açaí fruit sprinkled with tapioca. In cafes, visitors savored plates of Amazonian fish like pirarucu and tucunaré.

“This place is peaceful and magical, unlike where we came from,” said Alexis Álvarez, 29, a tattoo artist from Venezuela who moved here recently with his wife, a schoolteacher, and their 1-year-old daughter, seeking refuge in Brazil after enduring scarcities of food and medicine during Venezuela’s economic upheaval.

“We feel at home in Alter,” said Mr. Álvarez, explaining that he and his wife were supporting themselves by selling the jewelry they make. “I think we’re here to stay.”