Sitting on a plush sofa in his vast office, flanked by the flags of Tunisia and his Islamist party, Rachid Ghannouchi, known by followers as the Sheikh, is avuncular and professorial.

An unremarkable-looking man of 70 with silvery hair, wearing an ordinary grey suit, an open-necked white shirt and with a shy, toothy smile, he is an astute politician with a formidable party machine. Months after he returned from 22 years of exile in the UK, the victory of Ghannouchi's An-Nahda party in Tunisia's first free elections is a political earthquake in the midst of the Arab spring.

Ten months ago Tunisians took to the streets in a revolution that had no leader, was non-political, non-ideological and non-religious, ousting the dictator Ben Ali and inspiring similar uprisings across the region. Now Ghannouchi's brand of moderate Islamism has taken around 40% of the vote in what he calls "the first free and fair elections in the Arab world".

It is the first Islamist election success in the region since Hamas won a Palestinian vote in 2006. Nahda (Renaissance) has defined itself as "a new model for the world": Islamist and pro-democracy, modern, open and consensual, an antidote to the western notion of a clash of civilisations.

The party accepts it must now tread a fine line to navigate Tunisian society. The small Maghreb country has a long secular tradition, a strong civil society, a relaxed attitude to religion and the most advanced women's rights in the Arab world. If 40% of voters chose Islamists, 60% voted for parties which were secular or preferred to keep religion in the private sphere.

Brutally oppressed, exiled, imprisoned and tortured under Ben Ali, Nahda owes part of its election success to its standing as a party which struggled for decades against the old regime. "It is an extraordinary moment. In less than a year, An-Nahda has gone from an underground movement in exile that didn't exist on the ground in Tunisia, to a legal party and now, we can suppose, to the centre of a government team that will have to respond to socioeconomic demands," said Malika Zeghal, a Tunisian professor of Islamic thought at Harvard University.

"It will be quite a test. They have to show they can be pragmatic and that they can respond to the opposition coming from more secular segments of society. We haven't seen anything public coming out yet but there are cleavages between the Nahda leadership and the base. I think the base is sometimes more radical than the leadership would seem to be. One of the challenges of the party will be to manage that difference."

After full results are released Nahda will set about forming a coalition government with centrist secularists. Tunisia's new assembly has one main task: to rewrite the constitution and set a date for parliamentary elections in a year's time.

All parties agree on cleaning up Tunisia's notoriously repressive police and its crooked justice system which kept the dictatorship afloat. All, including Nahda, agree to maintain the constitution's current definition of Tunisia as a Muslim country, not an Islamic republic. Instead, the party pushes its own mix of liberal economics and religious social conservatism, with an emphasis on the family; what Ghannouchi calls "a democratic society built on Islamic values".

In a country which for 50 years was ruled by a personality cult, with giant awnings of the leader's face hanging from public buildings, Nahda argues the presidential system should be abolished completely. It wants a parliamentary system broadly along the lines of the UK but without a second chamber. Ghannouchi says he is not interested in personal power or the presidency. "We don't want to see another dictator come through the presidential system – that's the gate by which despotism arrived."

He says the police, still accused of torture post-revolution, should be overhauled "to serve the people, not the ruler, whether secularist or Islamist.

"Because you know a dictator can wear a turban just as they can wear a hat or any other symbol."

The key issue in the next few days is what jobs the Islamists take in a coalition government. There will likely be an Islamist prime minister, with a secular, centrist interim president. But the new government will inherit a depressed economy, struggling tourism sector, regional inequality between the coast and poor rural interior and crippling unemployment – a root cause of the revolution. It is officially at 19% but thought to be much higher, and over 40% for female graduates.

Nahda has promised 590,000 new jobs over five years and to cut unemployment to 8.5%. Ghannouchi said: "Economically we want a model like Sweden, a social model [and] welfare state, while encouraging entrepreneurs."

On family values, Nahda has promised not to touch the Tunisian legal code which made it the only country in the Arab world to outlaw polygamy, mandated women's approval to get married and set limits on a man's power to divorce. But Ghannouchi wants to promote the importance of marriage and lower the divorce rate.

"There was a process of dismantling and fragmenting society under despotism, the family was crushed," he said. "We have the third highest divorce rate in the Arab world. There's a societal problem, which we want to address and not brush over."

Ghannouchi calls Nahda a "broad umbrella party" of Islamists. The question is how broad and whether the centre ground will hold. Nahda likens itself to Turkey's socially conservative, Islamist-rooted Justice and Development party. However, the party of Turkish prime minister Recep Tayyip Erdogan is the product of 40 years of evolution, several military coups and a split from more fundamentalist parties.

Some candidates who opposed Nahda said they saw a "double discourse" between party line and more radical rank and file. Lilia Alouni, a secondary school philosophy teacher in Kairouan who ran on a secular list that did not get elected, said: "As a democrat I respect the results. Nahda had a close contact with the electorate on the ground and their discourse clearly reassured voters. But in the rural villages, I found there was a certain difference between the moderate discourse of the party's leaders and more conservative party activists on the ground."

Ghannouchi said any "counter currents" in his party were in a minority. Asked if his party was an unknown quantity, he cited decades of opposition struggle: "We're hardly the Freemasons," he said. "We're not a Sufi sect. We are a modern party."

Because of the 50:50 parity rules on men and women on lists, Nahda will see a number of female candidates win seats.

Amira Yayhaoui, a blogger and rights activist who ran as an independent candidate said: "The party must make sure all those women do take their seats. Tunisia's laws on family and women are very good compared to other Arab countries, but we really need to progress in terms of universal women's rights. One worry about Nahda is that although they're unlikely to roll back women's rights, will they just stick with the status quo and not improve things?"

The party's formidable media operation makes others look amateurish. Journalists interviewing Ghannouchi and even smaller figures in party have been surprised to be filmed by a party worker "to make sure your quotes are correct".

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.