Pedro Ugarte, Getty Images
An election official marks a voter's finger in Bhaktapur.

KATMANDU, Nepal — Nepalis embraced the country's return to democracy Thursday with millions voting in an election meant to secure lasting peace in a land riven by communist insurgents and an autocratic king.

Undeterred by shootings and clashes that killed two people, many voters lined up before sunrise outside polling stations across this Himalayan land. Some broke into applause when voting began.

Millions saw the country's first election in nine years as too historic to miss.

"This is our chance to stop the bleeding," said Arpana Shrestha, a 47-year-old woman waiting to vote in Katmandu. "Always there was blood in Nepal. Not anymore."

An estimated 60 percent of the 17.6 million voters cast ballots at 20,000 polling stations.

But the violence — including the slaying of an independent candidate — shows how hard it will be to forge true peace in this often ill-governed and violent country.

The election of a 601-seat Constituent Assembly to write a new constitution has been touted as the cornerstone of a 2006 peace deal with former rebels, known as the Maoists, following weeks of unrest that forced Nepal's king to cede power, which he had seized the year before.

In the two years since, Nepal has seen an armed uprising by ethnic minority groups — unrest that twice delayed the vote.

The election campaign was marked by clashes between supporters of rival parties and small bombings. In the two days before the vote, eight people were killed.

Thursday's death toll was lower than most had feared, but still marred a day that held great symbolic value for many in the impoverished nation, where 60 percent of the 27 million people are under age 35.

"We are getting our rights and these people have to kill. It's not good," said Gopal Acharya, a 22-year-old student and first-time voter.

In southeastern Nepal, assailants fatally shot an independent candidate outside a polling station. Elsewhere, motorcycle-riding gunmen unsuccessfully tried to kill another contender.

Also in southern Nepal, a supporter of the Nepali Congress died from wounds sustained in a clash with supporters of a minority ethnic group, the Madeshis.

Authorities were forced to postpone balloting until a later date at 33 polling places, said Chief Election Commissioner Bhoj Raj Pokhrel. They included a few stations in the eastern Ramechap district where Maoists blocked representatives of other parties from observing the vote, said Home Ministry spokesman Ekmani Nepal.

Maoists also torched one polling station. Police said they arrested 15 men, seizing three grenades and a knife.

Maoist officials in Katmandu said they were trying to verify the reports.

Their leader, who goes by the nom de guerre Prachanda, hailed the election, saying in a statement: "We believe this will take Nepal to a new era."

But before Nepal can get there, significant challenges remain.

The violence could easily provide a pretext for any of the major parties — from the Maoists to centrist democrats to royalists — to reject the election's outcome.

Then there is the complexity of the vote itself, a mix of direct elections and a nationwide proportional representation system with quotas for women and myriad ethnic and caste groups. International experts say it will be hard to sort out the results.

"Parties will trade allegations of fraud and violence" in the election's aftermath, the International Crisis Group, a Brussels-based think tank, warned in a report. "The behavior of powerful losers will shape the immediate aftermath."

Those losers could include the Maoists, expected to place behind the Nepal Congress and left-wing Communist Party of Nepal (United Marxist-Leninist).

In Washington, State Department spokesman Sean McCormack said initial reports indicated "the level of violence and some of the issues of concern are somewhat less than we might have expected."

U.N. Secretary-General Ban Ki-moon congratulated Nepal on an "orderly and peaceful" election and appealed to all parties for calm while awaiting the results, U.N. deputy spokeswoman Marie Okabe said.

The U.N. says the Maoists have been behind a majority of the election-related violence. They also have 20,000 former fighters across the country, and their weapons are stored in easily accessible containers under a U.N.-monitored peace deal.

Observers also worry about armed minority groups on the southern plains.

And then there is the man who is as close to a sure loser as Nepal has at the moment — King Gyanendra.

Major parties have agreed to abolish the 239-year-old monarchy at the assembly's first sitting. But he still has supporters in the army and among some Hindus who see him as the incarnation of the Hindu god Vishnu.