By Patrick Markey and Tarek Amara
TUNIS (Reuters) - Veteran politician Beji Caid Essebsi declared victory in Sunday's presidential run-off vote, seen as the last step in Tunisia's shift to full democracy four years after an uprising ousted autocrat Zine El-Abidine Ben Ali.
Official results are not due until Monday and his rival, the incumbent president, Moncef Marzouki, refused to concede defeat.
But soon after polls closed, Essebsi, an 88-year-old former parliament speaker under Ben Ali, announced that he had won by a clear margin and jubilant supporters took to the streets of the capital in celebration, chanting "Beji President!"
Victory for Essebsi would enable him to consolidate power, with his new secular party, Nidaa Tounes (Call for Tunisia) already controlling parliament after defeating the main Islamist party in legislative elections in October.
With a new progressive constitution and a string of votes successfully completed, Tunisia is hailed as an example of democratic change in a region that is struggling to cope with the aftermath of the 2011 Arab Spring revolts.
"I dedicate my victory to the martyrs of Tunisia. I thank Marzouki, and now we should work together without excluding anyone," Essebsi told local television.
However his rival Marzouki, a 69-year-old former rights activist, rejected the victory claim and suggested that he would emerge the winner when the official results were released.
"Tunisia has won today, democracy has won, we need to stay united. Despite the claims of our adversary, all indications are positive for us, we look ahead," he told cheering supporters from the balcony of his Tunis campaign headquarters.
Police fired tear gas to disperse a few hundred protesters in a southern city who took to the streets to denounce Essebsi's victory speech, the state news agency TAP reported.
Although Tunisia has largely avoided the bitter post-revolt divisions that trouble Egypt and neighboring Libya, tensions nevertheless flared between Islamists and secularists after the 2011 rebellion in one of the Arab world's most secular nations.
Islamist militants who emerged in the wake of the uprising remain a risk. One gunman was killed overnight and three arrested after they opened fire on a polling station in the central Kairouan governorate.
RETURN OF THE "REMNANTS"
Accepting former regime officials -- known as the "Remnants" by their critics -- back into politics was one of the steps that initially helped restore calm and keep Tunisia's often unsteady transition to democracy on track.
Essebsi took 39 percent of votes in the first round ballot in November with Marzouki winning 33 percent.
As front runner, Essebsi dismissed critics who said victory for him would mark a return of the old regime stalwarts. He argued that he was the technocrat Tunisia needed following three messy years of an Islamist-led coalition government.
Marzouki, who had sought refuge in France during the Ben Ali era, painted an Essebsi presidency as a setback for the "Jasmine Revolution" that forced the former leader to flee into exile.
However, many Tunisians tie Marzouki's own presidency to the previous government led by the Islamist party and the mistakes opponents said it made in being too lenient with hardline Islamists in one of the Arab world's most secular countries.
Still, compromise has been important in Tunisian politics and Essebsi's party reached a deal with the Islamist Ennahda (Renaissance) party to overcome a crisis triggered by the murder of two secular leaders last year.
Ennahda stepped down at the start of this year to make way for a technocrat transitional cabinet until elections. But the Islamists remain a powerful force after winning the second largest number of seats in the new parliament.
Essebsi appealed to the more secular, liberal sections of Tunisian society, while analysts predicted that Marzouki would draw on support from more conservative rural areas.
The presidency post holds only limited powers over national defense and foreign policy.
(Reporting by Tarek Amara; writing by Patrick Markey; editing by Andrew Hay, Jason Neely and Crispian Balmer)