Muhammad Sajjad Asim, who sued Edinburgh Central Mosque for breach of contract, said many imams are not paid the minimum wage, are not given holidays, are expected to supplement their pay with benefits, and sometimes given accommodation that is no more than a rolled-up mat in a corner of the mosque.
When Asim was recruited to the post of imam at the Edinburgh mosque from Pakistan, he found himself working seven days a week without holidays, and was allowed no parental leave when one of his children was born - all for below a rate of the minimum wage, and for less cash than he had been promised.
He was also caught in the crossfire of in-fighting and power play between factions in the mosque - which was originally set up by Pakistanis, but funded by Saudis. He was blamed for spreading slanderous rumours, which he always denied. One mosque-goer even threatened to cut his throat. Police installed a panic button in his home.
Imams in the UK are frequently recruited from overseas. Asim said this is partly because Britons would not accept the conditions: "Instead they bring in other people who are unaware of the system. Then these people work five years as a slave while they wait to get their leave to remain [in the UK]."
Asim had been working as a Justice of the High Court and imam in the Punjab province, near Lahore in Pakistan, before he came to Edinburgh, after being offered the role while attending a conference in Birmingham.
But what he experienced on taking up his position was not what he had been expecting. The initial contract had been for £300 a week, but he found after a few months there that he was being paid only £866 a month. He says he complained, but that nothing was done.
"I brought my family over," said Asim. "But what I was paid was not sufficient for looking after them. They said they were going to provide full family accommodation, but they provided nothing. I couldn't live on what they were paying me." To fund his living expenses and rent, he sold his property in Pakistan.
A Jewish rabbi suggested he join a union. Asim found that as a "minister of religion", he could join Unite, and became the first imam to do so. "They told me that they didn't even have a category for imam. So they put me in the category 'minister of religion: Church of Scotland'."
However, Asim took no action against his employers until after he was dismissed by the mosque. He was accused of spreading rumours about a man and woman he saw in the library of the mosque together - a situation considered inappropriate by some Muslims. Despite repeatedly having denied this, he was targeted as the source. "The experience was extraordinarily stressful," said Asim. One person threatened to cut his throat and kill his family.
Before he came to Scotland, Asim said, he knew nothing about unions. "With a union you have something behind you and you can fight with the mighty," he said. With the help of Unite, he successfully sued Edinburgh Central Mosque for breach of contract.
Asim is now planning to work as an NHS and prison chaplain. He has already recruited five imams to join the union. "I suggested to many imams that they should join. When I did a course to be a Muslim chaplain, I met around 40 imams: the majority were in a similar situation to me. Most imams don't join a union because they are not aware that they can."
One mosque worker said: "Muhammad Sajjad Asim at least had a contract. There are imams from all over Britain without contracts, it's the done thing in the Muslim community. People come over and they will do anything, cleaning toilets, teaching children, and they're doing it because after five years they get their leave to remain and bring their family over. It's a sacrifice they are willing to make. And the mosques know this."
Shaykh Ibrahim Mogra, a leading British imam, said: "There have been cases where imams have not been treated fairly and properly, though they are few. One case, however would be too many."
He suggested that imams with such issues should turn to MINAB, the Mosques and Imams National Advisory Board - though this organisation can only give advice, not legal help. But he added: "If an imam feels they are not successful with MINAB, then they should consider joining a union."
One imam attached to a UK university confirmed that employment problems were not uncommon for imams, and mostly tended to arise in mosques that were not registered with the Home Office.
But he added: "This is not a problem confined to mosques. It's also there in Hindu temples and Sikh gurdwaras."
A Scottish Government spokesperson said: "Contracts of employment for imams in Scottish mosques are a matter for individual mosques and imams."
The Sunday Herald tried to contact Edinburgh Central Mosque, but no-one was available to speak.