The performance of the Palestinian Authority during the past 17 months has been impressive. It has managed against the odds to restore order in the West Bank to a degree not seen in many years. And it has confronted and disarmed nationalist and Islamist groups. Corruption is also not as rampant as it was a few years ago.

But this new stability comes at a cost. The Fatah faction, in the West Bank, controls the executive branch of government and the security services. Its political rival, Hamas, controls the Gaza Strip and the Parliament, but the Parliament is unable to exercise authority over the government. With no oversight, the government allows flagrant violations of law to go unpunished. Meanwhile, the security services have detained hundreds of people suspected of being a part of Hamas, often without charge or trial, and torture is sometimes used in their interrogation.

Nor is the Palestinian Authority able to translate its recent accomplishments into political gains in its negotiations with Israel. Israel is ignoring its own obligations under the United States-backed peace proposal known as the road map, most notably to freeze settlement construction and to dismantle its widespread network of checkpoints in the West Bank. As a result, critics are accusing the Fatah government of collaborating with Israeli occupation.

And the worst is yet to come. Soon, the Palestinian Authority will confront its biggest constitutional crisis since its inception in 1994. In January, President Mahmoud Abbas, the Fatah leader who was elected in 2005, and the Hamas-controlled Parliament, elected in 2006, will come to the end of their terms. Hamas and Fatah have not arranged for new elections.

This impending loss of legitimacy could have dangerous results.

Recall how, in 1999, when the interim arrangements of the Oslo agreements expired without an end to the occupation, younger nationalists led by Fatah leaders like Marwan Barghouti, in cooperation with Islamists, were emboldened to challenge the leadership of Yasir Arafatâs old guard. Public demand for violence against Israelis grew considerably, leading to a bloody five-year intifada. Today, the level of Palestinian public support for armed attacks against Israeli civilians inside Israel is higher than it has been since 2005.

To pre-empt any return of the intifada, Palestinians need to return to the path they abandoned after the 2006 elections when the world refused to recognize a Hamas government, and fully embrace democratic rule. Fatah and Hamas must agree to organize national elections in the West Bank and the Gaza Strip by January. In resuming democracy, Palestinians will find that they can also resume national unity and present their Israeli neighbors with genuine choices of peace and security. But the Palestinians cannot do this alone. They need American support and understanding.

Talks between Fatah and Hamas during the past few months, sponsored by Egypt, have led to an agreement in principle on holding elections for Parliament and the president. Such elections would require that Fatah and Hamas be willing to share power for a short time, perhaps six months, and build a joint police force in Gaza to ensure a fair vote.

But most important, it will depend on the willingness of the international community, particularly the United States, to endorse the elections.

While the United States is clearly interested in strengthening Mr. Abbasâs legitimacy and the Palestinian Authorityâs capacity, it probably fears the potential consequences of a Palestinian return to democracy. After all, Hamas could win the next elections, both for president and Parliament.

Polls I have conducted indicate that while Hamas has lost about a quarter of its popular base since the last elections, in January 2006 â today it has the backing of only one-third of potential voters â Fatahâs support has remained stagnant, at a little over 40 percent. Clearly, those who abandoned Hamas have not shifted to Fatah. Most disturbing for Fatah is that its leader, President Abbas, could easily lose to Ismail Haniya, Hamasâs most popular leader.

A Hamas victory, many would argue, would derail the peace process. But to many Palestinians, this statement misses the point; if the Palestinians donât speak with one voice, the peace process cannot go far.

Moreover, Fatah need not lose the elections. To win, it would need to overcome its internal weaknesses and fragmentation, hold its long-delayed Sixth Congress and reclaim the mantle of the Palestinian cause by showing progress in ending or at least containing Israeli occupation.

Recent student council elections, which are considered a barometer of factionsâ popularity in the West Bank, provide Fatah reason for some hope. At Birzeit University, for example, where Hamas had won elections handily in 2006 and 2007, Fatah won in 2008 by a 10 percentage point margin. This was 10 months after Hamasâs violent takeover of the Gaza Strip. Last month, Fatah defeated Hamas in the student elections again, though, due to the Israeli offensive against Gaza and disappointment with the Palestinian Authorityâs performance, its winning margin dropped to 5 percentage points.

Today, Palestinians sorely miss three things: national unity, democracy and peace. With elections, they would have a chance to regain at least two. It is a risk worth taking.

Khalil Shikaki is the director of the Palestinian Center for Policy and Survey Research.