With three weeks left before Afghanistan's first parliamentary elections since the 1980s, the country is gearing up enthusiastically for a massive exercise in postwar democracy.

Nearly 6,000 candidates have nominated themselves for the Sept. 18 balloting, including warlords who fought the Soviets as well as ex-communists, former officials of the Islamic Taliban militia, human rights activists and an unprecedented 582 women.

The candidates' photographs are plastered across the country, obliterating urban street signs and covering the mud walls of remote mountain villages. About 12.4 million people have registered to vote -- 2 million more than did for the historic first presidential election last October.

Yet amid the exuberance, there is widespread unease over a variety of potential obstacles to a safe and successful election. Voters are to choose 249 representatives to the lower house of parliament as well as members of 34 provincial councils that will help select the upper house.

Insurgents loyal to the Taliban militia have reasserted themselves with deadly vigor after failing in their threats to derail the presidential voting. In the past several months, hundreds of Afghan and U.S. soldiers, and a number of civilians, have been killed in bombings and ambushes apparently aimed at disrupting the elections.

To bolster security, the 9,000-member international force patrolling Afghanistan's northern and western provinces has brought in an additional 2,000 troops. The U.S. military, which represents the bulk of a coalition of about 20,000 operating in the south and east, is adding 700 service members.

Abdul Latif Hakimi, a purported Taliban spokesman, recently told news services that the militia would not target polling stations on voting day. To date, however, the violence has continued unabated. Four election workers and three candidates have been killed. On Tuesday, the U.N. special representative to Afghanistan, Jean Arnault, decried the "deteriorating" security situation in a report to the U.N. Security Council.

Female candidates -- for whom nearly 30 percent of seats are reserved -- appear particularly vulnerable to attack. Several dozen have reported receiving death threats. Mahbouba Sadat Ismaili, 32, the headmistress of a high school and a candidate in the eastern province of Khost, said she has barely campaigned outside the provincial capital.

"The elders of villages keep telling me they don't want any female candidates to come because they worry that the Taliban or al Qaeda will cause problems for them," she said. "So I have sent out male representatives to meet with them in my place."

Faisal Rahman Muslim, 39, a landowner and religious scholar running as an independent candidate in Khost, said he was more worried about powerful rivals. About a month ago, someone detonated a remote-controlled mine as his car drove past, badly injuring his legs. Muslim, who now walks with a cane, said he suspected the culprits "were candidates involved in the jihad" against the Soviets.

The roster of candidates is filled with former militia bosses who were permitted to run despite questionable human rights records and possible links to illegal armed groups. Many retain access to weapons and money despite the recent completion of an internationally run program to disarm them and their men, analysts said.

"After years of violence between ethnic and sectarian groups, there's finally an opportunity to have a representative body that gives voice to a wide cross section of Afghan society," said Joanna Nathan of the International Crisis Group, a research organization based in Brussels. But given the volatile mix of candidates and other problems, she said, "we're worried about what use the institution that's actually created will be."

Under Afghanistan's new electoral law, candidates with links to illegal militias are prohibited from running. But although complaints were lodged against more than 200 candidates on those grounds, a commission of Afghan and international representatives charged with reviewing the cases disqualified only 11.

Moreover, candidates who are suspected of involvement in atrocities can only be barred from running if they were convicted of an offense. But there have been no war crimes trials to date, and many former militia commanders were given posts in the transitional post-Taliban government in an attempt to win their support for democracy.

"The international community talks about justice and stability as if they were separate things. But only if you have people without blood on their hands in a government can people be confident in it," Nathan said. Since the international community has not been willing to challenge the warlords, she said, "now they will be entrenched in parliament."

Leaders of the nation's nascent political parties also worry that the voting system chosen by President Hamid Karzai to limit party influence will instead produce a chaotic and dysfunctional legislature. The system requires voters to choose only one candidate per province, even though provinces are to be represented by multiple officials.

Since the most popular candidates tend to vacuum up votes, the remaining winners may enter office with minimal support. This requires political parties to carefully educate their supporters to distribute votes among their candidates, rather than having everyone vote for the same, best-known member.

Most parliamentary democracies use some variation of a party list system in which people may vote for a political party, which fields a list of candidates. The larger the share of the vote a party receives, the more of its candidates win office.

There is concern that the single-vote system will produce a body that does not represent voters' will, opening the door for political leaders unhappy with the election results to question their validity.

Yonus Qanooni, a leading member of one of the anti-Soviet mujaheddin factions who came in a distant second to Karzai in October, is already complaining that Karzai's backers are planning to steal votes from his party through fraud.

Karzai, who does not belong to a party, vowed to avoid the bitter party feuding that led to violent government changes and civil war in Afghanistan from the 1970s through the 1990s. Aides said he favored the single-vote system precisely because of its inhibiting effect on political parties.

But Noor Ul-Haq Olomi, a former communist general and head of the National United Party of Afghanistan, charged that Karzai was simply trying to undercut legitimate political opponents. In their place, he warned, Karzai's system will produce a parliament incapable of forming coalitions or coherent policies.

"It wasn't political parties that were the problem in the past. It was the leaders of those parties," he said. "A democracy without political parties is nothing. It can't function."

A shop in Kabul, the Afghan capital, is plastered with campaign posters for the Sept. 18 parliamentary elections.