Ebrahim Yusuf Kazi, 67, was told by a judge he would have been jailed for longer - but the law prevented it as the offences took place 27 years ago.
The cleric sexually assaulted three victims - all aged under 11 - during class as he taught groups of youngsters alone inside the mosque, Swindon Crown Court heard.
He would invite the girls to read a passage from a book in front of the other children - before groping and touching their genitals under the desk.
He also locked himself in a toilet cubicle with one of the girls, removed her clothes before he touched and licked her body.
Kazi's campaign of abuse only surfaced 27 years later when the brave victims finally decided to speak out and confront him in court.
The women wept yesterday as they saw Kazi jailed after being convicted on five counts of sexual assault at the court in Wiltshire.
Judge Euaun Ambrose said: 'You were in a position of very considerable status, trust and authority.
'It was a position of total power and respect - not only within the mosque but also within the local Muslim community.
'You were trusted by those who attended the mosque. You were also trusted by the parents who sent their children to be taught by you.
'However, you wasted the opportunities the position gave you and indecently assaulted three of these children.
'All were pre-pubescent girls and all were entrusted to your care.
'This was a gross breach of trust. Against all this you continue to deny any responsibility for these offences and have shown no remorse.
'There has become much stiffer sentences for this type of behaviour but I am obliged as a matter of law to sentence you in regard to the law at the time.
'Had these offences been committed more recently the sentences that I pass would be much, much longer.'
Stephen Dent, prosecuting, said Kazi preyed on the youngsters while imam at the town's Broad Street Mosque, between June 1979 and April 1985.
He taught large groups of around 20 pupils alone in a room - making girls come up and read passages from a book to him.
He would then fondle their legs from underneath a desk, touching their private parts until they finished the passage.
Kazi's three devastated victims - aged around eight, nine and ten when the abuse started - claimed each terrifying and repeated episode could carry on for as long as 15 minutes.
He groomed one of his victims and continued to abuse her over a number of years.
He would take her to a toilet cubicle and progressed, over a period of time, from touching her under her clothes to stripping her and licking her body parts.
The court heard that the cleric was 'revered' in the girl's family so she did not speak out.
When one of the other girls told her parents what Kazi did to her - the defendant angrily branded her a 'liar' and the allegations went away.
Another family pulled their girl out of the mosque, after her brother witnessed the abuse.
They were forced to give evidence against Kazi at the trial last month which convicted him of five counts of sexual assault.
Judge Ambrose, quoting from impact statements of the three victims - now all grown women - said one still had nightmares about the abuse.
They all said it continued to affect their lives.
Martin Steen, defending, said Kazi had moved to Gloucester since the offences and was now a respected member of the community.
He claimed that Kazi, who is suffering with bad health and depression, has had to install panic alarms in his home since the offences came to light.
Mr Steen handed the judge 24 letters from community members, praising Kazi. One woman said she would never think twice about leaving her child with him.
He said: 'Perceptions have changed and in the mean time this man has changed. He has behaved impeccably in terms of support given to the community.'
As well as jailing Kazi for two years, Judge Ambrose also imposed a Sexual Offences Prevention Order against him.
The defendant, dressed in white religious robes and a Muslim skull cap, looked quizzically at his interpreter - translating in his native Gujarati - as he was ordered down to the cells.
The British judge wanted to give the imam a longer sentence, but he couldn't due to a technicality: the crimes happened 27 years ago. Graphic details on the imam's crimes have surfaced, as well as the reason why it took (infidel) justice 27 years to catch up with Ebrahim Yusuf Kazi.
Pedophilia is found in all cultures. The pedophilia scandal in the Catholic Church was of immense dimensions and in many ways is ongoing. But only in Islam does such behavior have divine sanction, based on Muhammad's consummation of his marriage to Aisha when he was 54 and she was nine. Since he is the supreme example for Muslim behavior, many Muslims find justification for behavior such as that displayed by Ebrahim Yusuf Kazi in Muhammad.