ANKARA, Turkey (AP) _ Ahmet Necdet Sezer, a staunch advocate of democratic rights, was elected Turkey's 10th president today.

Sezer, the chief justice of the Constitutional Court, was elected with 330 of the votes in the 550-member parliament. He will be only the fourth civilian to hold the post of president.

The election raises hopes that Sezer will be able to nudge Turkey toward the democratic reforms that are crucial if the country is to realize its goal of membership in the European Union.

``Sezer's coming to power could pave the way for long-awaited changes in free expression and press freedoms,'' said Sami Kohen, a commentator for the Milliyet newspaper.

In Sezer's central Anatolian hometown of Afyon, a few dozen people began dancing in the streets to the beat of drums and the sound of trumpets.

Sezer, the government's nominee for the presidency, was a compromise candidate whose name emerged after the leading political parties were unable to agree on a member of parliament to support for the post.

Parliament failed to elect a candidate in the first two rounds of voting, in which a two-thirds majority was required to win. Sezer won in the third round, when only a simple majority is required. His closest rival received only 113 votes.

The Turkish presidency is largely a ceremonial position, but presidents can play an important role during crises and often exert strong moral influence. Presidents serve single seven-year terms. Outgoing President Suleyman Demirel steps down May 16.

Sezer, 58, has a clean record and is regarded as a man of principle. In his first public speech after his nomination, Sezer said Turkey's presidential powers ``exceed the boundaries of parliamentary democracy'' and that the president's right to veto legislation infringes on democratic rights.

Sezer also has been critical of the constitution, which was drawn up during military rule. He has called for changes in Turkey's Draconian anti-terrorism laws. Under those laws, hundreds of people have been imprisoned for speeches, books or newspaper articles deemed to threaten national security.

``The new president's belief in Turkey's EU candidacy and in freedom of expression should be counted as an important assurance toward achieving (the EU's) criteria and improving democracy,'' wrote Derya Sazak, a commentator for the Milliyet newspaper.

Sezer's staunch support for freedom of expression has been applauded by the Islamic Virtue Party, which faces closure for challenging laws that enforce secularism. ``When he speaks it is as if someone from our party is speaking,'' said Recai Kutan, Virtue's leader.

But that stance apparently has raised concern in the all-powerful military, which sees itself as the guarantor of secularism here. The military also is likely to object to Sezer's criticism of its annual purge of officers suspected of links to Islamic groups or parties. Officers have no right of appeal.

No military officers attended a party that Sezer hosted earlier this month to mark the 38th anniversary of the Constitutional Court.

Despite those concerns, Sezer is generally considered a pro-secular figure. As chief justice, he ruled in favor of banning women from wearing Islamic-style headscarves at schools and public offices.

One piece of legislation Sezer could face is whether to endorse the death sentence against imprisoned Kurdish rebel leader Abdullah Ocalan. The rebel leader has appealed his sentence for treason to the European Court of Human Rights, and parliament is awaiting the results.

If parliament were to endorse the sentence, it would go to Sezer, who would have to give his final approval before the execution could be carried out.