KATMANDU, Nepal — Violence on the eve of a landmark election meant to cement a peace deal with Nepal's communist insurgents left at least seven people dead, officials said Wednesday. Police killed at least one protester and six former rebels in separate clashes.

The vote is intended to bring sweeping change to this long-troubled Himalayan country, and will likely mean the end of a royal dynasty that has ruled for centuries. But the clashes made clear that fashioning a lasting peace in this impoverished, ill-governed and frequently violent country won't be easy.

"For the peace process to be successful, the election needs to be credible," said Yubaraj Ghimire, editor of the newsweekly Samay. "It's not clear that it will be."

The demonstrator was killed after police fired on a mob of hundreds smashing shops and vandalizing buses to protest the slaying a day earlier of a candidate in the mountainous Surkhet district, said the area's police chief, Ram Kumar Khanal.

Authorities in the remote district had already imposed a curfew, which remained in place.

They also said they would delay the election in the area by at least a week, though the vote would go ahead in the rest of the country.

Two small, crude bombs were detonated outside a Katmandu hospital and the main election commission office, although no one was injured. There was no claim of responsibility.

Thursday's election is the first in the two years since King Gyanendra was forced to end his royal dictatorship and the Maoists, as the former rebels are known, gave up their 10-year fight for a communist state that left about 13,000 people dead.

For the 27 million people of Nepal, wedged between Asian giants India and China, the vote brings a promise of peace and an economic revival in this grindingly poor land that often more closely resembles medieval Europe than a modern state.

After weeks of near-daily clashes between supporters of rival parties and a handful of small bombings, the mood on the eve of the election is one of ambivalent optimism in this country perhaps best known for its bustling backpacker scene and soaring peaks like Mount Everest.

"We have no choice but to be hopeful," said Biraj Shresthra, a 43-year-old who runs a Katmandu electronics shop. "We've seen so much fighting. Maybe now it will stop."

The elections have twice been delayed, largely because of fighting by minority ethnic groups on the southern plains. The situation there is now calm, though a few groups threaten to disrupt the polls.

But most of the violence since the start of the election campaign, according to a United Nations mission overseeing the vote, has been carried out by the Maoists, whose supporters have roughed up rival candidates and attempted to intimidate voters.

On Tuesday, a gang of Maoists clashed with police in southwestern Nepal after the former insurgents tried to attack a prominent candidate from a rival party. Initial reports said one person had been killed, but police said Wednesday that six were slain.

The Maoists — with 20,000 ex-fighters camped across the country — are the wild card in the vote. Their weapons are in locked but easily accessible containers under a U.N.-monitored peace deal.

It would be easy for them to return to the bush if they don't like the election results.

For now, the Maoists say they will respect the voters' decision, and their leader urged restraint following Tuesday's clash with police.

"We should respond to such provocative crimes by the feudal forces ... through demonstrations of patience and determination in favor of free and fair polls," said Pushpa Kamal Dahal.

Along with the Maoists, dozens of parties, from centrist democrats to old-school royalists, are competing for seats in the assembly, which will govern Nepal.

Most observers believe the Maoists will place second or third behind Nepal's traditional electoral powers, the centrist Nepali Congress and the Communist Party of Nepal (Unified Marxist-Leninist).

The assembly's its first order of business is deciding whether to get rid of the throne, and the major parties have already decided the 239-year-old Shah dynasty should go.

But the king, who has largely remained silent ahead of the ballot, nonetheless urged the Nepalese to vote.

"We call upon all adult citizens to exercise their democratic right in a free and fair environment," he said in a written statement issued by the palace Wednesday.

Associated Press reporter Binaj Gurubacharya contributed to this story.