From Elliott's Azerbaijan:
"Quba's twin-across-the-river is the prosperous capital of Azerbaijan's "mountain Jews." Perhaps the only all-Jewish town outside Israel, the 6000 or so inhabitants are considered by some to be direct descendants of one of the "lost tribes" scattered after the destruction of the Jerusalem temple in 722BC. Other theories suggest that they're descended from Jews fleeing Iran in the 17th century or that they were simply Khazars who converted as a way to stay neutral in fueds between Christian and Muslim communities.
While Quba folk call it Qasaba, locals still use the village's distinctly Soviet-sounding Russian name, "big red village."
The Stalinist era was particularly unkind to Krasnaya Sloboda. Stalin banned the use of Hebrew, forcing the farming population to rear pigs and destroyed all but one of the 11 synagogues: today there are three."