In a city of 6,000 temples, where the streets are filled with Hindu pilgrims and barefoot holy men seek communion with their gods, a furor over a mosque should, one might imagine, be all about religion.
Certainly in some ways it is. Hindus revere Ayodhya as the birthplace of the god Rama, and many believe the mosque built here in the 16th century stood on an even older temple marking the exact spot where Rama was born.
But in India, religion is seldom far from politics. And for 11 years since Hindus wrecked the mosque and vowed to rebuild the temple, it has been the most powerful political tool in India.
It has brought obscure parties and politicians to power and been used by everyone seeking the Hindu vote, from the most fervently religious parties to the most secular.
"There's nothing religious about this," said Kamal Mitra Chenoy, an international studies professor at New Delhi's Jawaharlal Nehru University. "This is the political use of religion."
There are signs, though, that Ayodhya's power maybe waning.
When the courts banned a rally of hard-line Hindus planned for Friday, organizers said 100,000 or more believers would sneak into the town and warned darkly of religious violence.
The reality was far different: 16,000-plus hard-liners were arrested in the days before the rally, and the event itself was little more than a 30-minute clash between police and some 1,500 activists, who later lined up peacefully to be bused away.
For India's secularists, and much of the rest of the world, that was good news. The nation of 1.02 billion desperately wants to become a major economic power, and must already struggle with poverty, seemingly innumerable natural disasters and confrontations with Pakistan as it transforms itself into a serious high-tech player known for its thriving software cities. Hindu militancy, its critics say, is yet another hurdle India has to overcome.
The timing of Friday's rally appeared to have little to do with Hinduism and plenty with November elections in four Indian states, at least two of which could be decided by hard-line Hindu voters. There are also national elections next year.
"Every time there's an election, they bring up Rama to use as their polling agent," grumbled Gyan Das, a Hindu priest in Ayodhya and a bitter opponent of militant Hindu politicians.
But those militants are now deeply divided over Ayodhya. The ruling Hindu nationalists, the Bharatiya Janata Party, have been forced into a sometimes-desperate juggling act, trying to keep the Ayodhya dispute from setting off still more violence, while not alienating hard-line militants who want a temple built on the site immediately.
Repeatedly, violence has been sparked in this town, where a maze of narrow streets wind amid temples that range from the table-sized to the palatial. The Hindu faithful endure innumerable checkpoints, friskings and rings of heavily armed security to walk past the site of their dreamed-of temple — now just a half-excavated archaeological site with the tiny makeshift temple off to the side.
In 1992, perhaps 150,000 militants marched through those streets and tore the mosque down with metal bars and their bare hands. The riots that followed shook India for weeks, killing more than 2,000 people.
Last year, 60 Hindu pilgrims from Ayodhya were killed when their train cars were set on fire, apparently by Muslims. Some 1,000 Muslims died in the ensuing riots.
Modern Indian politics can be traced alongside the history of the dispute.
The late Prime Minister Rajiv Gandhi, a staunch secularist, sought Hindu votes by allowing a symbolic first brick of a Rama temple to be laid in 1989.
Lal K. Advani, now deputy prime minister and one of the most powerful politicians on the subcontinent, came to prominence leading the march that ended with the mosque's 1992 destruction.
As for the BJP, it won power in 1998 campaigning almost solely on one issue — rebuild the Rama Temple on the wreckage of the Babri Mosque. But it largely abandoned the campaign in order to win partners in a coalition government.
For the most part, the politicians most closely linked to Ayodhya saw the mosque as a symbol of the days, long ago, when Muslims ruled much of what is now India. Today, in a country that is 84 percent Hindu and has a Hindu nationalist government, some still talk of India being a place where Hindus are oppressed and Muslims coddled.
"We are victims," said Pravin Togadia, general secretary of the fiercely militant World Hindu Council, which organized the Friday rally. Often accused of anti-Muslim bigotry, the group is among several calling for "Hindutva" — an India governed by Hindu principles.
Togadia doesn't hide his disdain for the BJP government, which he says abandoned the cause of the temple and is "the Indian state that surrendered to radical Islam."