TUNIS (Reuters) - For 23 years, Tunisians prayed in fear. They limited their visits to the mosque. They talked to no one. Women could not wear the veil on the street and men could not wear long beards for fear of arrest. On Friday, for the first time since the overthrow of secular ex-president Zine al-Abidine Ben Ali, Tunisians attended their weekly sermon without fear that this public expression of piety would cost them their jobs or their freedom. We couldnt pray freely before, Abdel Kouki, 57, said outside the Quds mosque in the Tunisian capital as hundreds of men, most in suits or jeans, streamed into the small mosque. Some spilled out onto its courtyard, where they knelt on straw mats. Women, their heads covered, crept in through a side entrance to their gallery to pray. Like many Arab leaders, Ben Ali styled himself as a bulwark against the spread of extremism and Al-Qaeda and enjoyed good ties with the West until the last days of the Tunisian uprising that unseated him this month. Many said that under Ben Ali, plain clothes police infiltrated the mosques and filed reports on those who seemed to be praying too often or too ardently. In Tunisia, if you want to get a permanent job, you have to go through a security check on your political views, whether you are leftist, Islamist, nationalist, Rida Harrathi, a self-proclaimed Islamist, told Reuters as he entered the mosque. I was expelled from work and when I asked why they said your problem is with the interior ministry... If you are honest about yourself, and especially if you are an Islamist, you will lose your job or you will not be confirmed in it. Under Ben Ali, women who covered their hair in the Islamic tradition, the hijab, were denied access to education and jobs. Many say police would stop them in the streets, strip them of their headscarves and force them to sign papers renouncing the veil. Men with long beards were similarly treated and the men outside the mosque were largely clean-shaven. Before, the imam would have to give his sermon in advance to the authorities, said the mosques mouezzin, who leads the call to prayer, declining to give his name. On the first of three days of mourning for the 78 people killed in the uprising, the imam, or prayer leader, of Quds Mosque prayed for the dead and for democracy but warned his congregation not to get carried away with reprisals against the ruling RCD party and to work for the unity of Tunisia. The (Arab) regimes around us dont want us to succeed. They want us to fail. They want to say look at Tunisia and what happened to them, he said in his sermon. We must take advantage of this current change and move to elections... We should leave the RCD alone... This exclusion is not to our benefit. Leave them to their party, he added.