The burned-out hulks of police cars mark the entrance to the town. Signposts are pocked by gunfire. A makeshift shrine sits at the intersection, commemorating with red plastic flowers the place where police shot and killed an unarmed protester and wounded dozens of others on June 3. Ever since, Nardaran has been a town in rebellion. More than 100 men now live in a flimsy tent on Imam Hussein Square, vowing to continue their protest until "freedom or death."

Azerbaijan's authoritarian government, led by President Heydar Aliyev, calls them radical Muslims bent on toppling a secular state, and says it had no choice but to deploy deadly force against the townspeople.

The protesters say their uprising is not religious but political, a response to the abysmal social conditions throughout this oil-rich country stricken by poverty.

Their months-long defiance of the government has become an unexpected test for a regime that calls itself a democracy but often rules otherwise.

"Free Nardaran" is now a rallying cry for the increasingly strong political opposition in the country, used as shorthand for frustration with Aliyev's strong-arm tactics.

The events in this town of 8,000 people on the outskirts of Azerbaijan's capital, Baku, have also raised pointed questions about U.S. policy across a volatile region in the former Soviet Union. In seeking new allies in the region, especially since the Sept. 11, 2001, terrorist attacks, the United States has often partnered with Soviet-era holdovers known for human rights abuses and anti-democratic ways.

The balancing act between human rights and strategic interests has been particularly difficult in Azerbaijan, where the United States had a major interest long before Sept. 11, lured by the prospect of huge oil and gas reserves in the Caspian Sea that within a few years could account for a significant new source of global energy. Since Sept. 11, Deputy Secretary of State Richard Armitage has praised Azerbaijan's "crucial cooperation" in the war on terrorism, and the United States has granted Aliyev a key concession, lifting a ban on certain forms of U.S. aid to the country. The ban resulted from the early-1990s war with Armenia over the disputed territory of Nagorno-Karabakh.

In embracing Aliyev, who was a member of the Soviet Politburo, the United States has preferred to see him as the secular leader of a moderate Muslim state, counterbalancing the fundamentalist government in neighboring Iran and post-Cold War tensions with Russia, rather than the old-style dictator he is accused of being by human rights groups and domestic political opponents. Aliyev has often obliged U.S. goals, most significantly by cutting a deal with the Clinton administration on a new Caspian oil pipeline that will bypass Iran and Russia.

Here in Nardaran, sitting under a blue tarp that passes for their winter home, the protesters say the government's campaign against them is designed to win further support from the United States. "They want to enforce their dictatorship, and they want America to pay for it," town elder Aga Nuriyev said of the Azeri authorities. "Ever since September 11, the way is clear -- call it Islamic fundamentalism, and the Americans will support you."

Now, with Azerbaijan slated to hold a presidential election this year and the physically frail Aliyev, 79, waging an increasingly public campaign to establish his son Ilham as his successor, many Azeris fear that the United States will choose to look the other way at a crucial time for the country.

Nuriyev said he bluntly told officials at the U.S. Embassy that "when they send us to jail for 15 years, we will blame you.' " The United States, he added, "may turn out to be interested in our resources, not in us."

In Baku, a city of palatial new mansions for the elite and a few hours of electricity a day for the impoverished majority, that concern was echoed by independent observers, opposition politicians and economists.

"It's the old policy of the West -- okay, he's a tyrant but he's our tyrant," said Eldar Mamazov, director of the Public Forum for Azerbaijan and a former top aide to Aliyev. "For many post-Soviet leaders, a pro-Western policy is like a trade with the West. 'Okay, I'll conduct a pro-Western policy, but you should close your eyes on corruption, violation of human rights.' They think the only thing that's changed in this country is that the Politburo has been moved from Moscow to Washington."

Despite Azerbaijan's strategic position, its problems would hardly seem to make it an ideal U.S. foothold in the region.

Transparency International, an international monitoring group, ranks Azerbaijan as one of the most corrupt countries in the world -- 84th on a list of 91 -- and more corrupt than any other former Soviet state. The International Monetary Fund -- concerned about the lack of transparency in the State Oil Fund, where Azerbaijan's oil income goes -- recently announced it was suspending lending to the country. Twenty percent of the country is occupied by Armenia after the still-unresolved Nagorno-Karabakh war, which left an estimated 1 million refugees homeless and destitute.

International observers say Azerbaijan has not had a single fair election. Aliyev seized power from elected president Abulfez Elchibey in 1993 and declared himself the winner of elections in 1998 with 77 percent of the vote. The country has an opposition press and political parties, but experts say it still has neither an independent judiciary, nor a truly independent television network. Human rights groups say there are 300 political prisoners.

And despite billions of dollars in oil and gas contracts signed by the Azeri government with Western firms, average wages hover around $60 a month, according to official statistics, which are challenged by outside observers. Unemployment is so high that an estimated 1 million-plus Azeris out of a population of 8 million have left the country seeking work, many of them as illegal migrants in Russia or Turkey.

Still, Aliyev's government is eager to promote itself as the crucial U.S. ally in an unstable region. In an interview, Foreign Minister Vilayat Quliyev touted "intensive" cooperation with the United States since Sept. 11, including the arrest in Azerbaijan of an Egyptian suspected of cooperating with al Qaeda. Aliyev's choice, he said, "is not just to sell oil to the West but also to develop more close contacts to Western society. . . . We are trying to have a more pro-Western policy."

Aliyev's government is also selling "stability," knowing that is what the United States and Western oil companies crave, according to both those in the government and its opponents. Senior presidential adviser Ali Hasanov said Aliyev has stabilized the country's currency and credit situation, curbed inflation and increased hard currency reserves, all while conforming the country's laws to "European standards."

"I read every day that Aliyev created an authoritarian regime . . . . [But] everyone can do whatever they want as long as it's legal," Hasanov said. "Of course, there is not the anarchy that existed here in 1992 and 1993, when everyone allowed himself to violate the law whenever they could. So now let us say there is authoritarianism -- authoritarianism of the law."

But the increasingly vocal democratic opposition -- which consists of nine political parties that united to bring tens of thousands of protesters into the streets of Baku several times in the fall -- argues that Aliyev's failure to improve the standard of living has sharply diminished the popularity he had in the early 1990s.

"A situation like that here is just the appearance of stability, but it is stability that could collapse in a moment," said Etibar Mamedov, leader of the Azerbaijan National Independence Party. "The U.S. should be friends with the people of Azerbaijan, and not just the president of Azerbaijan. A president who infringes on the rights of his own people can't be a strong ally for the United States."

Mamedov said Aliyev wants to designate his son Ilham as his successor -- a "hereditary dictatorship." That is also the conclusion of diplomats and other veteran observers here, who say the succession campaign has become Aliyev's top priority. Ilham Aliyev, 41, is vice president of the powerful state-run oil company, as well as deputy chairman of the ruling New Azerbaijan Party. A fluent English speaker, he represents the country at the Council of Europe, frequently rebuffing European complaints about the human rights situation.

On a recent trip to Washington, Ilham Aliyev attended high-level meetings with Bush administration officials. He has his own Web site to record his policy pronouncements, and it is eagerly promoted by presidential aides.

Aliyev's critics say he wants to ensure the succession to preserve his family's privileged economic position; many Aliyev relatives hold top government jobs and dominate private businesses in areas as diverse as private school-building and caviar. "Aliyev considers Azerbaijan as a big business that belongs to him, and he wants to pass it on to his son," said Isa Gambar, the leader of the Equality party and the likely unity candidate of the opposition in this year's presidential election.

Here in Nardaran, it is precisely the country's big-money-for-a-small-elite that townspeople say sparked their protest.

In June, several hundred police officers surrounded the town and began shooting live ammunition at protesters who were angered by the detention of a group of elders. Fifteen townspeople and the head of the Azerbaijan Islamic Party have been in jail ever since.

In Soviet times, the town was a relative haven of prosperity, thanks largely to a flourishing black-market trade in carnations the men here sold for huge profit in Moscow. But since Aliyev came to power, the electricity and gas needed to heat greenhouses during the winter have been cut off, and residents estimate unemployment is close to 100 percent.

"I used to be rich; now we don't even have money for bread," said Aga Mamedtagizadi, driving an aged white Mercedes that is all that's left of his Soviet-era black-market wealth.

The townspeople are less willing to talk about their pious observance of Islam, which has exacerbated their dispute with the state. In most of secularized Azerbaijan, women wearing head scarves are a rarity, but in Nardaran they are the norm. At the famous Shiite religious shrine in the town, a huge new mosque has been built in recent years.

"Of course we pray to God, we don't have anyone else to ask," said Najev Mamedzadi, 41, one of the protesters. He said he hasn't worked in years. "We ask America, and they don't help. We ask Europe, they don't help. So now we ask God to help us."

Burned, overturned police cars mark the entrance to the town of Nardaran, on the outskirts of the Azeri capital, where protesters clashed with police. A man in Nardaran, a town of about 8,000, shows the graves that protesters say they have dug for themselves. Their motto is "Freedom or Death." Townspeople mourn at the grave of an unarmed protester killed by police in Nardaran in June. The town's mosque is part of a famous Shiite shrine.