Five minutes before several bombs ripped through Ahmedabad in 2008, the Indian Mujahideen, a banned Islamist terrorist organisation, sent a letter to media organisations, claiming credit for the act.

"You have provoked the Mujahideen to massacre you and your five and a half crore multitude of pathetic infidels who tortured us in the post-Godhra riots asking 'where is your Allah'?" it said.

Their statement made it clear that domestic events play a large role in fuelling the anger of terrorists. That's exactly the conclusion reached by a new report commissioned by the Woodrow Wilson International Center for Scholars, a think tank in the US.

"The Indian jihadist movement formed organically and as a result of endogenous factors, specifically communal grievances and a desire for revenge," writes the author, Stephen Tenkel, a professor at American University.

However, Tankel says that Indian Islamist extremism has an "external dimension." But it would be incorrect, Tankel says, to explain Indian jihadism primarily by reference to Pakistan. The Indian Mujahideen threat "is a response to Indian domestic failings, including political malfeasance, economic inequality, and a widespread sense of injustice," the report says.

Few Islamist terror attacks in the country have taken place in a vacuum. Rather, most followed incidents of communal violence, which were the result of a sustained vitiation of the atmosphere by Hindu fundamentalist forces.

Take the serial blasts that ripped through Mumbai in 1993. This first-ever attack in a major Indian city claimed 257 lives and was organised by the underworld don Dawood Ibrahim.  The recruits were seeking revenge for the 1992-1993 Mumbai riots in which 1,000 people died, two-thirds of whom were Muslim.

The Mumbai riots also involved systematic targetting of Muslim businesses and property.

The outrage about the riots provided Dawood with scores of recruits to carry out the bomb blasts, a task for which they were trained in Pakistan.

The Justice Srikrishna Commission instituted to investigate the riots came down heavily on the Shiv Sena party for its role in fanning communalist sentiments. This became a core grievance for the jihadist movement, writes Tankel.

The burning of a train carrying Hindu pilgrims in Godhra in February 2002 was the spark for a horrific communal conflagration in Gujarat, which many claim is more accurately described as a pogrom against the state's Muslims.

In the violence that followed, 790 Muslims and 254 Hindus were killed. Other estimates claim that nearly 2,000 Muslims died in the conflict.

The anger over this violence led to a series of Islamist terror strikes across the country, perpetrated by organisations like the Indian Mujahideen.

As it did with the 2008 Ahmedabad blasts, the Indian Mujahideen explicitly identified the 2002 Gujarat riots as the reason for other terrorist acts they executed, such as the September 2008 Delhi bombings and the 2007 Uttar Pradesh serial blasts.

Similarly, the Lashkar-e-Qahhar, the terrorist organisation that claimed credit for the 2006 Mumbai train blasts, said the attack was in retaliation both to the situation in Gujarat and the Kashmir conflict.

While the desire for revenge is the main driving force for jihadists, perceived imbalances in the justice system also play a role.

To date, the recommendations of the Justice Srikrishna Commission on the Mumbai riots have neither been accepted nor acted upon by the Maharashtra government. However, 100 men and women found guilty of conspiring to set off the retaliatory blasts have been sentenced.

The Godhra train burning resulted in the conviction of 31 people, all Muslim, on charges of conspiracy for an incident in which the actual cause of the fire has yet to be firmly established.

But in the case of the 2002 Gujarat riots, the prosecution of the alleged rioters has faced problems, with witnesses being bribed or intimidated.

As of 2013, 249 convictions had been secured -- of 184 Hindus and 65 Muslims. The Supreme Court has been extremely critical of the Gujarat government's investigation and prosecution of those accused of violence during the riots.

In its 2003 annual report, Amnesty International stated, "The same police force that was accused of colluding with the attackers was put in charge of the investigations into the massacres, undermining the process of delivery of justice to the victims."

Apart from the communal violence and the imbalance in the justice system, Indian Muslims face social discrimination.

According to the Sachar Committee, commissioned in 2005 to examine the social, economic and educational conditions of Indian Muslims, Muslim graduates had the highest unemployment rate of any socioreligious group.

Overall, Muslims were found to be underrepresented at elite educational institutions as well as in the Indian Administrative Service (three per cent), the Indian Foreign Service (1.8 per cent) and the Indian Police Service (four per cent).  The only area where Muslims were over-represented was in prison.
Tankel concludes that Indian jihadism is not a major threat to
regional stability or India’s rise. "Rather, it is a symptom of certain
factors: a bilateral relationship with Pakistan that remains defined
by zero-sum competition, and poor internal governance, political
malfeasance, economic inequality, and widespread sense of
injustice," he writes.

The report concludes by quoting an unidentified former police official. “Pakistan may be taking advantage of the situation to radicalise Muslim boys," he told Tankel. "They may even be controlling the IM. But even if they are, then so what? We still must look within as to why Indians are susceptible. And it’s up to us to solve this problem here."