Russia’s great expanse stretches south from the Arctic for many thousands of miles until it comes to a halt at the long spine of the Greater Caucasus Mountains. The republics on the northern side of the Caucasus, including turbulent Dagestan and Chechnya, still belong to Russia. Azerbaijan, Georgia, and Armenia, on the southern side of the mountains, gained their independence when the Soviet Union collapsed in the early 1990s. The high slopes are home to shepherds and the descendants of clans who have long lived there. Lower down, where sleepy towns look up from valleys to the snowy peaks, bigger communities try to scratch out a living.In one of these towns—Oguz, Azerbaijan, a four-and-a-half-hour drive from Baku, the country’s oil-booming capital on the western shore of the Caspian Sea—live up to 80 Mountain Jews among a population of more than 6,000. The history of the Mountain Jews, who live mainly in Azerbaijan and the Russian republic of Dagestan is, according to members of the community, rooted about 2,500 years ago in their exodus from Israel, their gradual passage through Persia (where they picked up the Farsi-based language they still speak), and their eventual settlement in the Caucasus mountains.Sitting in the dark-stone building that houses Baku’s Mountain Jewish synagogue, Semyon Ikhilov, the Mountain Jews’ national leader, shakes off the idea that his people might be descended from indigenous Caucasian mountain dwellers who converted to Judaism. “We’re real Jews who came out of Israel,” Ikhilov said, explaining that they acquired the moniker “Mountain Jews” because they settled in the peaks. “We were not mountain people.” And according to a recent genetic study led by researchers in Israel and Estonia, Mountain Jews share a common origin in the Levantine region of the Near East with other Diaspora Jewish communities.While once there were as many as 40,000 Jews in Azerbaijan, today there are between 8,000 and 25,000. The estimate varies widely in part because many of them live in Israel or Russia but still retain Azeri passports. Among those who remain in Oguz, many seem to practice a Judaism guided by the spirit of the religion rather than by the letter of its law. They live in a country where more than 90 percent of the population is Muslim, and the demanding rhythm of working on the Soviet-era kolkhoz, or collective farm, coupled with the atheism of the Soviet Union, may all have, over time, muted the zeal of the Jews of Oguz.Yet push a bit further and an attachment to Judaism emerges. “Last night we lit the Shabbat candles,” says 30-year-old Gunai Iusupova, sitting in the airy dining room of her wooden-balconied Caucasian house. “We said a brucha and ate salted bread. I served up food prepared fresh for Shabbat.” The garden outside was bright with pale pink and deep red summer roses. “And that’s not just us, that’s all the Jews here in Oguz,” she adds, explaining that although they may not observe all the rules of Shabbat precisely, Friday night dinner is sacrosanct.Standing in the hot sun outside one of the town’s two synagogues, Temur Natalinov, 54, who maintains both houses of worship, explained that he opens them every Shabbat. The men leave quickly, he said, but the women often linger.Arranged marriages are not uncommon here, Racim Hananayev, 50, the leader of Oguz’s Jews, told me, even for those who leave the town. Hananayev’s wife, Dilbar, served a breakfast of egg, salty cheese, fresh bread, and thick homemade strawberry preserve. She offered met, a bitter, uniquely Caucasian condiment made from the green cherry plum.Nowhere is the mix of Azeri and Jewish cultures more fascinating than in Krasnaya Sloboda, which sits across a river from Guba, famous throughout the Caucasus for its woven rugs. Just beyond the two settlements looms an imposing mountain, white and icy even in summer.The two towns seem similar enough, though Krasnaya Sloboda looks more prosperous, full of houses with freshly painted brickwork, new windows, and new iron and lattice roofs mixed in among a few dilapidated wooden homes.But the difference is more than surface deep. Krasnaya Sloboda is inhabited almost exclusively by Mountain Jews, between 2,000 and 5,000 of them, according to various estimates. In the mid-18th century the khan of Guba, Hussein, established Yevraiskaya Sloboda, literally “Jewish settlement,” as a place for Jews to live safe from attack. His son and successor, Feteli, so the story goes, decreed that if anyone came to attack the town, the Jews should light fires and he would see them from across the river and send help to defend the inhabitants.The town, which was renamed “Krasnaya,” or “red,” in honor of the Soviet Red Army, has seen its population dwindle from its Communist-era height of 18,000. Some emigrants have gone to Israel, others to Moscow, where many are successful businessmen—hence the prosperous appearance of some buildings here—and where a few have become multi-millionaires, with their reputations becoming legendary back home. According to one Jewish local I spoke with, one of these titans “holds half of Moscow in his hands.”Those that stay while away the hot days in an outdoor chaikhana, a typical Azeri teahouse, sucking on sugar cubes soaked in tea. Nearby, under the shade of chestnut trees, old men play nard, a traditional board game.Iunus Davidov, a Jewish 19-year-old, explains that there was no work in the town and that in winter there is hardly a soul to be seen there. “It is hard,” he says. “And in winter it is so cold, it can fall to minus 35 degrees, and sometimes there is no gas or electricity.”Nonetheless, Krasnaya Sloboda has three schools and two synagogues, with a third being beautifully restored, and in the summer nearly all the émigrés return to spend some time in their hometown, Davidov said.“There is always a minyan, indeed we always have at least 50 people at prayer time,” says Boris Simanduyev, a community leader. “There has always been a rabbi from Krasnaya Sloboda, and there always will be.” On entering the town’s main synagogue, which is covered wall-to-wall in overlapping oriental rugs, we had removed our shoes, as is the custom here.Rugs also cover the floor of the cool central room in the Yevdaev family home, where 32-year-old Sara Yevdaeva gathered leaves to stuff with meat to make dolma, food for relatives who were due to arrive from Moscow and Baku for the first anniversary of Sara’s mother-in-law’s death. Sara explains one of the customs of her community. “Whether it is here or in Moscow or elsewhere, Mountain Jews don’t allow their wives to work,” she says.The hardships of winter make year-round life in the town impossible for Sara to imagine, but Moscow, where she lives for most of the year, has its difficulties too. The rise of extreme nationalism in Russia means Sara, who like many Mountain Jews looks much like any other person from the Caucasus, has experienced the racist abuse frequently leveled at people from Russia’s southern borderlands and beyond. The Mountain Jews all concur that, unlike in Russia, in Azerbaijan they have never experienced any prejudice.This is all the more surprising, perhaps, in a country where international observers have documented increasing restrictions on freedom of expression and where dissent is often quashed. The current president, Ilham Aliyev, took over from his late father, Heydar, in 2003. Posters of both Aliyevs, in action and thoughtful repose, are everywhere. In 2009 the government amended the constitution to tighten controls on religious groups, making all unregistered religious activity illegal. Those who received their religious education abroad, for example, are banned from leading religious activities.The Azerbaijan State Committee for Work with Religious Associations, though, argues that the changes in the law on religion strengthen tolerance in the country. The committee’s press office explains that some religious leaders educated abroad had come under the influence of radicals who aimed to destroy Azerbaijan’s “tolerant atmosphere,” and the minister in charge of such matters has previously linked the 2009 moves on religion with combating Islamic fundamentalism—the threat of Wahhabism and of Islamic violence in the North Caucasus spilling over into Azerbaijan.In late 2009, a Baku court jailed 26 people for an August 2008 attack on a mosque in the capital, in which two people were killed. Those convicted claimed to be members of a radical Islamist group that is believed to have roots in the north Caucasian republic of Dagestan. Also in 2009, two Lebanese men were jailed in Baku for conspiring to attack the Israeli embassy there. In 2007, the Azeri authorities said they had prevented attacks on oil installations and the British and U.S. embassies planned by what they called a “radical Wahhabi group.”Critics, however, suggest that the authorities are using the threat of fundamentalism to tighten the screws on religious communities and restrict free speech.Evidently, the government perceives no threat from Azerbaijan’s Jewish communities, nor from Israel, with which it has a developing relationship. Shimon Peres’ 2009 trip to Baku was the most recent and highest-level visit by an Israeli dignitary, a move that angered Iran. Azerbaijan—which is locked in an unresolved territorial conflict with neighboring Armenia—buys arms from Israel, and there is an Israeli embassy in Baku. This relationship is doubtless appreciated by Azerbaijan’s Jews, who are courted by the authorities with official greetings on Rosh Hashanah and Pesach and visits to synagogue openings.According to Alexander Murinson, an expert on Azerbaijan’s Jews and Azeri-Israeli relations, Azeri respect for the Jews is genuine and deeply rooted—in part stemming from the fact that in Soviet times, Jews, especially Ashkenazim, were well represented among the Azeri intellectual elite. Those Jews who stayed, he said, still have some leverage, with the Mountain Jews wielding power due to the strength of their trading clans.There is also a more calculated political element to the relationship. In the early days of Azeri independence the authorities deliberately reached out to the Jewish communities, realizing that they could be a magnet for the organized Jewish community in the United States, with its impressive lobbying power, said Murinson. And for a government sometimes accused of intolerance, its relationship with the Jewish minority seems to be put on display, not least by Jewish leaders, two of whom insisted to me that President Aliyev had repeatedly described the Mountain Jews as his brothers. Many foreign dignitaries visiting Azerbaijan find that Krasnaya Sloboda is on their itinerary, as what Murinson called a “showcase.” The state, by email, disagreed: The visits are not for show, a spokesman explained, but to meet its own high standards of tolerance.Sarah Marcus is a freelance journalist based in Tbilisi, Georgia, and has contributed to The New York Times, The Washington Post and the Daily Telegraph.